regulator: wm831x-ldo: Fix max_uV for gp_ldo and aldo linear range settings
authorAxel Lin <axel.lin@ingics.com>
Mon, 23 Sep 2013 07:54:20 +0000 (15:54 +0800)
committerMark Brown <broonie@linaro.org>
Mon, 23 Sep 2013 11:04:54 +0000 (12:04 +0100)
commitf3ef11b485db3fa57e635c64a3fd86533f5e42c8
tree74e72b6f73136d5f86cd9e0cf404f89037cae801
parent272b98c6455f00884f0350f775c5342358ebb73f
regulator: wm831x-ldo: Fix max_uV for gp_ldo and aldo linear range settings

Fix the linear range settings in commit 5ff26a14c3331
"regulator: wm831x-ldo: Convert to use linear ranges".

For wm831x_gp_ldo:
We have below equations for list voltage before converting to linear ranges:

sel <= 0xe:
        volt = 0.9-1.6V in 50mV steps
sel <= 0x1f:
        volt = 1.7-3.3V in 100mV steps

max_uV for the first linear range should be 1600000 rather than 1650000. Fix it.

For wm831x_aldo:
We have below equations for list voltage before converting to linear ranges:

sel <= 0xc:
        volt = 1-1.6V in 50mV steps
sel <= 0x1f
        volt = 1.7-3.5V in 100mV steps

max_uV for the first linear range should be 1600000 rather than 1650000. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/wm831x-ldo.c