summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/wm831x-ldo.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-03-29 15:02:55 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-29 12:06:24 +0100
commite841a36abb0f95ea356d52e4386b8e8f762e9c40 (patch)
tree25e5e19848547828d877cd472d331cf26a4995a1 /drivers/regulator/wm831x-ldo.c
parentfa5a97bb0c65cb8d0382b72a55e2b87e15268289 (diff)
downloadop-kernel-dev-e841a36abb0f95ea356d52e4386b8e8f762e9c40.zip
op-kernel-dev-e841a36abb0f95ea356d52e4386b8e8f762e9c40.tar.gz
regulator: Fix setting low power mode for wm831x aldo
Set BIT[8] of LDO7 ON Control mode for low power mode. R16507 (407Bh) LDO7 ON Control BIT[8] LDO7_ON_MODE: LDO7 ON Operating Mode 0 = Normal mode 1 = Low Power mode Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/wm831x-ldo.c')
-rw-r--r--drivers/regulator/wm831x-ldo.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
index f1e4ab0..641e9f6 100644
--- a/drivers/regulator/wm831x-ldo.c
+++ b/drivers/regulator/wm831x-ldo.c
@@ -506,22 +506,19 @@ static int wm831x_aldo_set_mode(struct regulator_dev *rdev,
{
struct wm831x_ldo *ldo = rdev_get_drvdata(rdev);
struct wm831x *wm831x = ldo->wm831x;
- int ctrl_reg = ldo->base + WM831X_LDO_CONTROL;
int on_reg = ldo->base + WM831X_LDO_ON_CONTROL;
int ret;
switch (mode) {
case REGULATOR_MODE_NORMAL:
- ret = wm831x_set_bits(wm831x, on_reg,
- WM831X_LDO7_ON_MODE, 0);
+ ret = wm831x_set_bits(wm831x, on_reg, WM831X_LDO7_ON_MODE, 0);
if (ret < 0)
return ret;
break;
case REGULATOR_MODE_IDLE:
- ret = wm831x_set_bits(wm831x, ctrl_reg,
- WM831X_LDO7_ON_MODE,
+ ret = wm831x_set_bits(wm831x, on_reg, WM831X_LDO7_ON_MODE,
WM831X_LDO7_ON_MODE);
if (ret < 0)
return ret;
OpenPOWER on IntegriCloud