diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-07-19 15:10:31 +0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-28 11:00:24 -0700 |
commit | 8db98440facad7e3a194f21ce6069e04bff336c6 (patch) | |
tree | 7ca20257e4be2dfd323d3bbbffd39b49367d9c8d /drivers/regulator/lp8788-ldo.c | |
parent | 825d105910d549e69748b19f83031b231152ac9d (diff) | |
download | linux-8db98440facad7e3a194f21ce6069e04bff336c6.tar.bz2 |
regulator: mc13892: Simplify implementation of mc13892_sw_regulator_set_voltage_sel()
Use mc13xxx_reg_rmw rather than a mc13xxx_reg_read and a mc13xxx_reg_write calls.
This logic to set MC13892_SWITCHERS0_SWxHI bit is pretty simple:
if (volt > 1375000)
set MC13892_SWITCHERS0_SWxHI bit
else if (volt < 1100000)
clear MC13892_SWITCHERS0_SWxHI bit
else
leave MC13892_SWITCHERS0_SWxHI bit untouched
We already know the selector, so we don't need to calculate the selector again.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/lp8788-ldo.c')
0 files changed, 0 insertions, 0 deletions