Commit eb416815 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: Fix restoring pmic.dcdcx_hib_mode settings in wm8350_dcdc_set_suspend_enable

What we want is to restore wm8350->pmic.dcdcx_hib_mode settings to
WM8350_DCDCx_LOW_POWER registers. Current code also clears all other
bits of WM8350_DCDCx_LOW_POWER registers which is wrong.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5777d9b3
...@@ -495,25 +495,25 @@ static int wm8350_dcdc_set_suspend_enable(struct regulator_dev *rdev) ...@@ -495,25 +495,25 @@ static int wm8350_dcdc_set_suspend_enable(struct regulator_dev *rdev)
val = wm8350_reg_read(wm8350, WM8350_DCDC1_LOW_POWER) val = wm8350_reg_read(wm8350, WM8350_DCDC1_LOW_POWER)
& ~WM8350_DCDC_HIB_MODE_MASK; & ~WM8350_DCDC_HIB_MODE_MASK;
wm8350_reg_write(wm8350, WM8350_DCDC1_LOW_POWER, wm8350_reg_write(wm8350, WM8350_DCDC1_LOW_POWER,
wm8350->pmic.dcdc1_hib_mode); val | wm8350->pmic.dcdc1_hib_mode);
break; break;
case WM8350_DCDC_3: case WM8350_DCDC_3:
val = wm8350_reg_read(wm8350, WM8350_DCDC3_LOW_POWER) val = wm8350_reg_read(wm8350, WM8350_DCDC3_LOW_POWER)
& ~WM8350_DCDC_HIB_MODE_MASK; & ~WM8350_DCDC_HIB_MODE_MASK;
wm8350_reg_write(wm8350, WM8350_DCDC3_LOW_POWER, wm8350_reg_write(wm8350, WM8350_DCDC3_LOW_POWER,
wm8350->pmic.dcdc3_hib_mode); val | wm8350->pmic.dcdc3_hib_mode);
break; break;
case WM8350_DCDC_4: case WM8350_DCDC_4:
val = wm8350_reg_read(wm8350, WM8350_DCDC4_LOW_POWER) val = wm8350_reg_read(wm8350, WM8350_DCDC4_LOW_POWER)
& ~WM8350_DCDC_HIB_MODE_MASK; & ~WM8350_DCDC_HIB_MODE_MASK;
wm8350_reg_write(wm8350, WM8350_DCDC4_LOW_POWER, wm8350_reg_write(wm8350, WM8350_DCDC4_LOW_POWER,
wm8350->pmic.dcdc4_hib_mode); val | wm8350->pmic.dcdc4_hib_mode);
break; break;
case WM8350_DCDC_6: case WM8350_DCDC_6:
val = wm8350_reg_read(wm8350, WM8350_DCDC6_LOW_POWER) val = wm8350_reg_read(wm8350, WM8350_DCDC6_LOW_POWER)
& ~WM8350_DCDC_HIB_MODE_MASK; & ~WM8350_DCDC_HIB_MODE_MASK;
wm8350_reg_write(wm8350, WM8350_DCDC6_LOW_POWER, wm8350_reg_write(wm8350, WM8350_DCDC6_LOW_POWER,
wm8350->pmic.dcdc6_hib_mode); val | wm8350->pmic.dcdc6_hib_mode);
break; break;
case WM8350_DCDC_2: case WM8350_DCDC_2:
case WM8350_DCDC_5: case WM8350_DCDC_5:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment