regulator: fix voltage range in da9034 ldo12

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This commit is contained in:
Haojian Zhuang 2009-09-21 12:14:12 -04:00 committed by Liam Girdwood
parent d87b969d15
commit 55c1d7c60d
1 changed files with 1 additions and 1 deletions

View File

@ -301,7 +301,7 @@ static int da9034_set_ldo12_voltage(struct regulator_dev *rdev,
}
val = (min_uV - info->min_uV + info->step_uV - 1) / info->step_uV;
val = (val > 7 && val < 20) ? 8 : val - 12;
val = (val >= 20) ? val - 12 : ((val > 7) ? 8 : val);
val <<= info->vol_shift;
mask = ((1 << info->vol_nbits) - 1) << info->vol_shift;