diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-13 07:15:27 +0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-03-18 20:27:32 -0700 |
commit | a498d293fa0e36d6c4ed54518801c0533e0242be (patch) | |
tree | 1618cc8bacd0c09d135d0d46122901bb65700100 /drivers/regulator | |
parent | 8056a1e83b4fd2f6853290ef111cda7f90498306 (diff) |
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>
(cherry picked from commit 585993932ccc44ab6a8c6dc590a2f3d6b2facb41)
Change-Id: I1cb46d05396a286ba34c84b1836b9070f0f78003
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/90516
Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/regulator')
-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 a477a0040beb..ed23dd264182 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; |