diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-13 00:15:27 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-14 00:18:03 +0100 |
commit | 585993932ccc44ab6a8c6dc590a2f3d6b2facb41 (patch) | |
tree | feb819b4befd6c48c2bb8e68f6f024db8bf3be40 /drivers/regulator/tps65910-regulator.c | |
parent | regulator: Merge tps65217_pmic_ldo234_ops and tps65217_pmic_dcdc_ops to tps65... (diff) | |
download | linux-585993932ccc44ab6a8c6dc590a2f3d6b2facb41.tar.xz linux-585993932ccc44ab6a8c6dc590a2f3d6b2facb41.zip |
regulator: Fix the logic of tps65910_get_mode
We actually clear LDO_ST_ON_BIT for standby mode in tps65910_set_mode.
Fix the logic in tps65910_get_mode.
Supply state (EEPROM bits):
ST[1:0] = 00 : Off
ST[1:0] = 01 : On high power (ACTIVE)
ST[1:0] = 10 : Off
ST[1:0] = 11 : On low power (SLEEP)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/tps65910-regulator.c')
-rw-r--r-- | drivers/regulator/tps65910-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index 4ac0058dbf82..aa11ce86ec64 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c @@ -520,7 +520,7 @@ static unsigned int tps65910_get_mode(struct regulator_dev *dev) if (value < 0) return value; - if (value & LDO_ST_ON_BIT) + if (!(value & LDO_ST_ON_BIT)) return REGULATOR_MODE_STANDBY; else if (value & LDO_ST_MODE_BIT) return REGULATOR_MODE_IDLE; |