Skip to content

Commit

Permalink
lp3971: Fix setting val for LDO2 and LDO4
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Liam Girdwood committed Mar 22, 2010
1 parent 4f26a2a commit cdb868f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/regulator/lp3971.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit cdb868f

Please sign in to comment.