aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-03-23 21:37:30 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-26 06:55:29 -0400
commit51579137c500362018b5341f5dca47807ed558aa (patch)
treef3e87e4d953f884428df41757b92963e48f59ab5 /drivers/regulator
parent4992fa1fd425f1934f503ffa96b68e235b89db9a (diff)
regulator: tps6586x: Fix list minimal voltage setting for LDO0
According to the datasheet, LDO0 has minimal voltage 1.2V rather than 1.25V. Table 3-39. VLDO0[2:0] Settings VLDOx[2:0] VOUT (V) VLDOx[2:0] VOUT (V) 000 1.20 100 2.70 001 1.50 101 2.85 010 1.80 110 3.10 011 2.50 111 3.30 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/tps6586x-regulator.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 29b615ce3aff..cfc1f16f7771 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -79,6 +79,11 @@ static int tps6586x_ldo_list_voltage(struct regulator_dev *rdev,
79 unsigned selector) 79 unsigned selector)
80{ 80{
81 struct tps6586x_regulator *info = rdev_get_drvdata(rdev); 81 struct tps6586x_regulator *info = rdev_get_drvdata(rdev);
82 int rid = rdev_get_id(rdev);
83
84 /* LDO0 has minimal voltage 1.2V rather than 1.25V */
85 if ((rid == TPS6586X_ID_LDO_0) && (selector == 0))
86 return (info->voltages[0] - 50) * 1000;
82 87
83 return info->voltages[selector] * 1000; 88 return info->voltages[selector] * 1000;
84} 89}