summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lp3971.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-03-09 16:53:59 +0800
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-03-22 19:44:44 +0000
commitcdb868f58103825856e27aa4e1f26943fc119e41 (patch)
treed4549701910096830bffa366436c54f40877fbba /drivers/regulator/lp3971.c
parent4f26a2abe1eed18dc6adddf2d0ae5553e51578c2 (diff)
downloadop-kernel-dev-cdb868f58103825856e27aa4e1f26943fc119e41.zip
op-kernel-dev-cdb868f58103825856e27aa4e1f26943fc119e41.tar.gz
lp3971: Fix setting val for LDO2 and LDO4
In lp3971_ldo_set_voltage function, it requires val to left shift 4 bits for LDO2 and LDO4. This patch fix this issue. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator/lp3971.c')
-rw-r--r--drivers/regulator/lp3971.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index 55fab4a..8bdcf41 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -187,7 +187,8 @@ static int lp3971_ldo_set_voltage(struct regulator_dev *dev,
return -EINVAL;
return lp3971_set_bits(lp3971, LP3971_LDO_VOL_CONTR_REG(ldo),
- LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo), val);
+ LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo),
+ val << LDO_VOL_CONTR_SHIFT(ldo));
}
static struct regulator_ops lp3971_ldo_ops = {
OpenPOWER on IntegriCloud