diff options
author | Axel Lin <axel.lin@ingics.com> | 2012-12-05 19:24:11 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-07 01:24:12 -0500 |
commit | 7fa8a5975784cce646b3763e5d9957f8d688c9ce (patch) | |
tree | 9186d23e64b8c5130c611e95d17afb5966f69a0a /drivers/regulator/tps80031-regulator.c | |
parent | bf0caae3036563ef84d1dcb7b2c7fcbda59a889d (diff) |
regulator: tps80031: Convert tps80031_ldo_ops to linear_min_sel and list_voltage_linear
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/tps80031-regulator.c')
-rw-r--r-- | drivers/regulator/tps80031-regulator.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c index ce480499177e..b54300c64424 100644 --- a/drivers/regulator/tps80031-regulator.c +++ b/drivers/regulator/tps80031-regulator.c | |||
@@ -284,14 +284,6 @@ static int tps80031_ldo_get_voltage_sel(struct regulator_dev *rdev) | |||
284 | return vsel & rdev->desc->vsel_mask; | 284 | return vsel & rdev->desc->vsel_mask; |
285 | } | 285 | } |
286 | 286 | ||
287 | static int tps80031_ldo_list_voltage(struct regulator_dev *rdev, unsigned sel) | ||
288 | { | ||
289 | if (sel == 0) | ||
290 | return 0; | ||
291 | else | ||
292 | return regulator_list_voltage_linear(rdev, sel - 1); | ||
293 | } | ||
294 | |||
295 | static int tps80031_vbus_is_enabled(struct regulator_dev *rdev) | 287 | static int tps80031_vbus_is_enabled(struct regulator_dev *rdev) |
296 | { | 288 | { |
297 | struct tps80031_regulator *ri = rdev_get_drvdata(rdev); | 289 | struct tps80031_regulator *ri = rdev_get_drvdata(rdev); |
@@ -398,7 +390,7 @@ static struct regulator_ops tps80031_dcdc_ops = { | |||
398 | }; | 390 | }; |
399 | 391 | ||
400 | static struct regulator_ops tps80031_ldo_ops = { | 392 | static struct regulator_ops tps80031_ldo_ops = { |
401 | .list_voltage = tps80031_ldo_list_voltage, | 393 | .list_voltage = regulator_list_voltage_linear, |
402 | .set_voltage_sel = tps80031_ldo_set_voltage_sel, | 394 | .set_voltage_sel = tps80031_ldo_set_voltage_sel, |
403 | .get_voltage_sel = tps80031_ldo_get_voltage_sel, | 395 | .get_voltage_sel = tps80031_ldo_get_voltage_sel, |
404 | .enable = tps80031_reg_enable, | 396 | .enable = tps80031_reg_enable, |
@@ -465,6 +457,7 @@ static struct regulator_ops tps80031_ext_reg_ops = { | |||
465 | .type = REGULATOR_VOLTAGE, \ | 457 | .type = REGULATOR_VOLTAGE, \ |
466 | .min_uV = 1000000, \ | 458 | .min_uV = 1000000, \ |
467 | .uV_step = 100000, \ | 459 | .uV_step = 100000, \ |
460 | .linear_min_sel = 1, \ | ||
468 | .n_voltages = 25, \ | 461 | .n_voltages = 25, \ |
469 | .vsel_mask = LDO_VSEL_MASK, \ | 462 | .vsel_mask = LDO_VSEL_MASK, \ |
470 | .enable_time = 500, \ | 463 | .enable_time = 500, \ |