aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps65023-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-06-13 22:22:59 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-17 15:56:01 -0400
commitec0ab07587f0d2af208366158f5fd487311f1c56 (patch)
treea12d13efef87b59199a22ce04459e9eed40681d5 /drivers/regulator/tps65023-regulator.c
parentc705742201260afd08b05ff84674507735e2b16b (diff)
regulator: tps65023: Set n_voltages to 1 for fixed voltage
For fixed voltage, the n_voltages should be 1 rather than 0. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/tps65023-regulator.c')
-rw-r--r--drivers/regulator/tps65023-regulator.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c
index f841bd0db6a..df8b70d76f9 100644
--- a/drivers/regulator/tps65023-regulator.c
+++ b/drivers/regulator/tps65023-regulator.c
@@ -324,7 +324,10 @@ static int __devinit tps_65023_probe(struct i2c_client *client,
324 324
325 tps->desc[i].name = info->name; 325 tps->desc[i].name = info->name;
326 tps->desc[i].id = i; 326 tps->desc[i].id = i;
327 tps->desc[i].n_voltages = info->table_len; 327 if (info->fixed)
328 tps->desc[i].n_voltages = 1;
329 else
330 tps->desc[i].n_voltages = info->table_len;
328 tps->desc[i].ops = (i > TPS65023_DCDC_3 ? 331 tps->desc[i].ops = (i > TPS65023_DCDC_3 ?
329 &tps65023_ldo_ops : &tps65023_dcdc_ops); 332 &tps65023_ldo_ops : &tps65023_dcdc_ops);
330 tps->desc[i].type = REGULATOR_VOLTAGE; 333 tps->desc[i].type = REGULATOR_VOLTAGE;