diff options
author | David Schalig <dschalig@nvidia.com> | 2011-04-02 15:01:38 +0900 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:43:10 -0800 |
commit | 943dfcbcf440ab9b29893c86b206c39bdc4a1638 (patch) | |
tree | e64b00a4830cc142068e8fc1fc0022788e27c10f | |
parent | 1a6095ddd2615bd6f4a0582a5b6f86fa0ba3f69d (diff) |
regulator: tps6586x: fix LDO0 voltage setting
Minimum voltage for LDO0 was specified with a code construct,
better solve this with a voltage table. This avoids a warning
in kernel log, too.
Bug 798821
Original-Change-Id: I706276a9aae3359006ddc7fe9134b67e00ec34fd
Reviewed-on: http://git-master/r/25185
Reviewed-by: David Schalig <dschalig@nvidia.com>
Tested-by: David Schalig <dschalig@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R800f3239d35415e5cb2f5ff2570f6f0285e44adc
-rw-r--r-- | drivers/regulator/tps6586x-regulator.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index 62bad442ed2a..3fd75e6c0cc4 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c @@ -95,10 +95,6 @@ static int __tps6586x_ldo_set_voltage(struct device *parent, for (val = 0; val < ri->desc.n_voltages; val++) { uV = ri->voltages[val] * 1000; - /* LDO0 has minimal voltage 1.2 rather than 1.25 */ - if (ri->desc.id == TPS6586X_ID_LDO_0 && val == 0) - uV -= 50 * 1000; - /* use the first in-range value */ if (min_uV <= uV && uV <= max_uV) { @@ -222,6 +218,10 @@ static int tps6586x_ldo_voltages[] = { 1250, 1500, 1800, 2500, 2700, 2850, 3100, 3300, }; +static int tps6586x_ldo0_voltages[] = { + 1200, 1500, 1800, 2500, 2700, 2850, 3100, 3300, +}; + static int tps6586x_ldo4_voltages[] = { 1700, 1725, 1750, 1775, 1800, 1825, 1850, 1875, 1900, 1925, 1950, 1975, 2000, 2025, 2050, 2075, @@ -283,7 +283,7 @@ static int tps6586x_dvm_voltages[] = { } static struct tps6586x_regulator tps6586x_regulator[] = { - TPS6586X_LDO(LDO_0, ldo, SUPPLYV1, 5, 3, ENC, 0, END, 0, 4000), + TPS6586X_LDO(LDO_0, ldo0, SUPPLYV1, 5, 3, ENC, 0, END, 0, 4000), TPS6586X_LDO(LDO_1, dvm, SUPPLYV1, 0, 5, ENC, 1, END, 1, 4000), TPS6586X_LDO(LDO_3, ldo, SUPPLYV4, 0, 3, ENC, 2, END, 2, 3000), TPS6586X_LDO(LDO_5, ldo, SUPPLYV6, 0, 3, ENE, 6, ENE, 6, 3000), |