From 54ac4f377623e82cc7e1721f3c136dc41e93c34d Mon Sep 17 00:00:00 2001 From: David Schalig Date: Sat, 2 Apr 2011 15:01:38 +0900 Subject: 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 Change-Id: I706276a9aae3359006ddc7fe9134b67e00ec34fd Reviewed-on: http://git-master/r/25185 Reviewed-by: David Schalig Tested-by: David Schalig Reviewed-by: Aleksandr Frid Reviewed-by: Bharat Nihalani --- drivers/regulator/tps6586x-regulator.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index 54de4c3a3d13..771c171a49f7 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c @@ -94,10 +94,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) { @@ -217,6 +213,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, @@ -278,7 +278,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), -- cgit v1.2.3