Skip to content

Commit

Permalink
regulator: tps6586x: Fix list minimal voltage setting for LDO0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Mark Brown committed Mar 26, 2012
1 parent 4992fa1 commit 5157913
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/regulator/tps6586x-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ static int tps6586x_ldo_list_voltage(struct regulator_dev *rdev,
unsigned selector)
{
struct tps6586x_regulator *info = rdev_get_drvdata(rdev);
int rid = rdev_get_id(rdev);

/* LDO0 has minimal voltage 1.2V rather than 1.25V */
if ((rid == TPS6586X_ID_LDO_0) && (selector == 0))
return (info->voltages[0] - 50) * 1000;

return info->voltages[selector] * 1000;
}
Expand Down

0 comments on commit 5157913

Please sign in to comment.