diff options
author | Axel Lin <axel.lin@gmail.com> | 2010-09-06 02:06:07 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-09-06 06:14:47 -0400 |
commit | 8ecee36adc9d2cf19471c395af6ef70264dec251 (patch) | |
tree | 60575479d2ec6b31ab8bb852e351409a66aac571 /drivers/regulator/wm8350-regulator.c | |
parent | e260999c66768c2fccd9da8c3918b4e0e5121b3a (diff) |
regulator: wm8350-regulator - fix the logic of checking REGULATOR_MODE_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>
Diffstat (limited to 'drivers/regulator/wm8350-regulator.c')
-rw-r--r-- | drivers/regulator/wm8350-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index 0e6ed7db9364..fe4b8a8a9dfd 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b/drivers/regulator/wm8350-regulator.c | |||
@@ -1129,7 +1129,7 @@ static unsigned int wm8350_dcdc_get_mode(struct regulator_dev *rdev) | |||
1129 | mode = REGULATOR_MODE_NORMAL; | 1129 | mode = REGULATOR_MODE_NORMAL; |
1130 | } else if (!active && !sleep) | 1130 | } else if (!active && !sleep) |
1131 | mode = REGULATOR_MODE_IDLE; | 1131 | mode = REGULATOR_MODE_IDLE; |
1132 | else if (!sleep) | 1132 | else if (sleep) |
1133 | mode = REGULATOR_MODE_STANDBY; | 1133 | mode = REGULATOR_MODE_STANDBY; |
1134 | 1134 | ||
1135 | return mode; | 1135 | return mode; |