regulator: wm8350-regulator - fix the logic of checking REGULATOR_MODE_STANDBY mode
PATCH 1/1 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. )
--- drivers/regulator/wm8350-regulator.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/wm8350-regulator.c +1 -1
@@ -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;
Signature · 1 line
1.7.2
Quoted 9 lines · Axel Lin
In
wm8350_dcdc_set_mode(), we setDCx_SLEEPbit ofWM8350_DCDC_SLEEP_OPTIONSregister forREGULATOR_MODE_STANDBYmode.
(DCx_SLEEPbits: 0: Normal DC-DC operation 1: Select LDO mode )In
wm8350_dcdc_get_mode(), current logic to determinateREGULATOR_MODE_STANDBYmode is just reverse.
( sleep is set should meanREGULATOR_MODE_STANDBYmode. )Signed-off-by Axel Lin <[email protected]>
but *please* do try to make your commit messages clearer, it's difficult to follow what you're sayin here, mostly because you don't explain how you determined what change to make.
Quoted 5 lines · Mark Brown
Quoted 3 lines · Axel Lin
In
wm8350_dcdc_set_mode(), we setDCx_SLEEPbit ofWM8350_DCDC_SLEEP_OPTIONSregister forREGULATOR_MODE_STANDBYmode.
(DCx_SLEEPbits: 0: Normal DC-DC operation 1: Select LDO mode )
Quoted 7 lines
Quoted 5 lines
In
wm8350_dcdc_get_mode(), current logic to determinateREGULATOR_MODE_STANDBYmode is just reverse.
( sleep is set should meanREGULATOR_MODE_STANDBYmode. )Signed-off-by Axel Lin <[email protected]>Acked-by Mark Brown <[email protected]>
All applied (last 4 regulator patches from Axel).
Thanks
Liam
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk