regulator: Fix the logic of tps65910_get_mode
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/regulator/tps65910-regulator.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/tps65910-regulator.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.5.4
Quoted 11 lines · Axel Lin
We actually clear
LDO_ST_ON_BITfor standby mode intps65910_set_mode. Fix the logic intps65910_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<[email protected]>---
Acked-by Laxman Dewangan <[email protected]>
Mark Brown
AppliedQuoted 2 lines · Axel Lin
We actually clear
LDO_ST_ON_BITfor standby mode intps65910_set_mode. Fix the logic intps65910_get_mode.
Applied, thanks.