aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/tps65912-regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/tps65912-regulator.c')
-rw-r--r--drivers/regulator/tps65912-regulator.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/regulator/tps65912-regulator.c b/drivers/regulator/tps65912-regulator.c
index ede688b1a56f..988d0ec40d2e 100644
--- a/drivers/regulator/tps65912-regulator.c
+++ b/drivers/regulator/tps65912-regulator.c
@@ -442,7 +442,7 @@ static int tps65912_get_voltage_dcdc(struct regulator_dev *dev)
442 return tps65912_list_voltage_dcdc(dev, vsel); 442 return tps65912_list_voltage_dcdc(dev, vsel);
443} 443}
444 444
445static int tps65912_set_voltage_dcdc_sel(struct regulator_dev *dev, 445static int tps65912_set_voltage_sel(struct regulator_dev *dev,
446 unsigned selector) 446 unsigned selector)
447{ 447{
448 struct tps65912_reg *pmic = rdev_get_drvdata(dev); 448 struct tps65912_reg *pmic = rdev_get_drvdata(dev);
@@ -472,19 +472,6 @@ static int tps65912_get_voltage_ldo(struct regulator_dev *dev)
472 return tps65912_vsel_to_uv_ldo(vsel); 472 return tps65912_vsel_to_uv_ldo(vsel);
473} 473}
474 474
475static int tps65912_set_voltage_ldo_sel(struct regulator_dev *dev,
476 unsigned selector)
477{
478 struct tps65912_reg *pmic = rdev_get_drvdata(dev);
479 struct tps65912 *mfd = pmic->mfd;
480 int id = rdev_get_id(dev), reg, value;
481
482 reg = tps65912_get_sel_register(pmic, id);
483 value = tps65912_reg_read(mfd, reg);
484 value &= 0xC0;
485 return tps65912_reg_write(mfd, reg, selector | value);
486}
487
488static int tps65912_list_voltage_ldo(struct regulator_dev *dev, 475static int tps65912_list_voltage_ldo(struct regulator_dev *dev,
489 unsigned selector) 476 unsigned selector)
490{ 477{
@@ -504,7 +491,7 @@ static struct regulator_ops tps65912_ops_dcdc = {
504 .set_mode = tps65912_set_mode, 491 .set_mode = tps65912_set_mode,
505 .get_mode = tps65912_get_mode, 492 .get_mode = tps65912_get_mode,
506 .get_voltage = tps65912_get_voltage_dcdc, 493 .get_voltage = tps65912_get_voltage_dcdc,
507 .set_voltage_sel = tps65912_set_voltage_dcdc_sel, 494 .set_voltage_sel = tps65912_set_voltage_sel,
508 .list_voltage = tps65912_list_voltage_dcdc, 495 .list_voltage = tps65912_list_voltage_dcdc,
509}; 496};
510 497
@@ -514,7 +501,7 @@ static struct regulator_ops tps65912_ops_ldo = {
514 .enable = tps65912_reg_enable, 501 .enable = tps65912_reg_enable,
515 .disable = tps65912_reg_disable, 502 .disable = tps65912_reg_disable,
516 .get_voltage = tps65912_get_voltage_ldo, 503 .get_voltage = tps65912_get_voltage_ldo,
517 .set_voltage_sel = tps65912_set_voltage_ldo_sel, 504 .set_voltage_sel = tps65912_set_voltage_sel,
518 .list_voltage = tps65912_list_voltage_ldo, 505 .list_voltage = tps65912_list_voltage_ldo,
519}; 506};
520 507