aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps6586x-regulator.c
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-07-30 15:58:58 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-08-11 06:38:01 -0400
commit4cc2e3934bd74afbdff595ad2183e8aa25d0a0f2 (patch)
treeb9a75c1f212581ed7478139248b97b6c9dc39649 /drivers/regulator/tps6586x-regulator.c
parent1b13f4bbcbe0d9797bcfd7c8bee7c077787313e1 (diff)
regulator: tps6586x: fix millivolt return values and SM2 table
Hi Liam, Below are bugfixes for the tps6586x spotted by Gary King. Please add this patch to your regulator tree. Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator/tps6586x-regulator.c')
-rw-r--r--drivers/regulator/tps6586x-regulator.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 76cc41ecbdf7..3c2eee8e7563 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -80,7 +80,7 @@ static int tps6586x_ldo_list_voltage(struct regulator_dev *rdev,
80{ 80{
81 struct tps6586x_regulator *info = rdev_get_drvdata(rdev); 81 struct tps6586x_regulator *info = rdev_get_drvdata(rdev);
82 82
83 return info->voltages[selector]; 83 return info->voltages[selector] * 1000;
84} 84}
85 85
86 86
@@ -137,7 +137,7 @@ static int tps6586x_ldo_get_voltage(struct regulator_dev *rdev)
137 if (val > ri->desc.n_voltages) 137 if (val > ri->desc.n_voltages)
138 BUG(); 138 BUG();
139 139
140 return ri->voltages[val]; 140 return ri->voltages[val] * 1000;
141} 141}
142 142
143static int tps6586x_dvm_set_voltage(struct regulator_dev *rdev, 143static int tps6586x_dvm_set_voltage(struct regulator_dev *rdev,
@@ -217,6 +217,13 @@ static int tps6586x_ldo4_voltages[] = {
217 2300, 2325, 2350, 2375, 2400, 2425, 2450, 2475, 217 2300, 2325, 2350, 2375, 2400, 2425, 2450, 2475,
218}; 218};
219 219
220static int tps6586x_sm2_voltages[] = {
221 3000, 3050, 3100, 3150, 3200, 3250, 3300, 3350,
222 3400, 3450, 3500, 3550, 3600, 3650, 3700, 3750,
223 3800, 3850, 3900, 3950, 4000, 4050, 4100, 4150,
224 4200, 4250, 4300, 4350, 4400, 4450, 4500, 4550,
225};
226
220static int tps6586x_dvm_voltages[] = { 227static int tps6586x_dvm_voltages[] = {
221 725, 750, 775, 800, 825, 850, 875, 900, 228 725, 750, 775, 800, 825, 850, 875, 900,
222 925, 950, 975, 1000, 1025, 1050, 1075, 1100, 229 925, 950, 975, 1000, 1025, 1050, 1075, 1100,
@@ -265,7 +272,7 @@ static struct tps6586x_regulator tps6586x_regulator[] = {
265 TPS6586X_LDO(LDO_9, ldo, SUPPLYV6, 3, 3, ENE, 7, ENE, 7), 272 TPS6586X_LDO(LDO_9, ldo, SUPPLYV6, 3, 3, ENE, 7, ENE, 7),
266 TPS6586X_LDO(LDO_RTC, ldo, SUPPLYV4, 3, 3, ENE, 7, ENE, 7), 273 TPS6586X_LDO(LDO_RTC, ldo, SUPPLYV4, 3, 3, ENE, 7, ENE, 7),
267 TPS6586X_LDO(LDO_1, dvm, SUPPLYV1, 0, 5, ENC, 1, END, 1), 274 TPS6586X_LDO(LDO_1, dvm, SUPPLYV1, 0, 5, ENC, 1, END, 1),
268 TPS6586X_LDO(SM_2, dvm, SUPPLYV2, 0, 5, ENC, 1, END, 1), 275 TPS6586X_LDO(SM_2, sm2, SUPPLYV2, 0, 5, ENC, 1, END, 1),
269 276
270 TPS6586X_DVM(LDO_2, dvm, LDO2BV1, 0, 5, ENA, 3, ENB, 3, VCC2, 6), 277 TPS6586X_DVM(LDO_2, dvm, LDO2BV1, 0, 5, ENA, 3, ENB, 3, VCC2, 6),
271 TPS6586X_DVM(LDO_4, ldo4, LDO4V1, 0, 5, ENC, 3, END, 3, VCC1, 6), 278 TPS6586X_DVM(LDO_4, ldo4, LDO4V1, 0, 5, ENC, 3, END, 3, VCC1, 6),