Skip to content

Commit

Permalink
regulator: wm8350-regulator - fix the logic of checking REGULATOR_MOD…
Browse files Browse the repository at this point in the history
…E_STANDBY mode

In wm8350_dcdc_set_mode(), we set DCx_SLEEP bit of WM8350_DCDC_SLEEP_OPTIONS
register for REGULATOR_MODE_STANDBY mode.
( DCx_SLEEP bits: 0: Normal DC-DC operation 1: Select LDO mode )

In wm8350_dcdc_get_mode(), current logic to determinate
REGULATOR_MODE_STANDBY mode is just reverse.
( sleep is set should mean REGULATOR_MODE_STANDBY mode. )

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
  • Loading branch information
Axel Lin authored and Liam Girdwood committed Sep 6, 2010
1 parent e260999 commit 8ecee36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/wm8350-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ static unsigned int wm8350_dcdc_get_mode(struct regulator_dev *rdev)
mode = REGULATOR_MODE_NORMAL;
} else if (!active && !sleep)
mode = REGULATOR_MODE_IDLE;
else if (!sleep)
else if (sleep)
mode = REGULATOR_MODE_STANDBY;

return mode;
Expand Down

0 comments on commit 8ecee36

Please sign in to comment.