return tps65912_list_voltage_dcdc(dev, vsel);
}
-static int tps65912_set_voltage_dcdc_sel(struct regulator_dev *dev,
+static int tps65912_set_voltage_sel(struct regulator_dev *dev,
unsigned selector)
{
struct tps65912_reg *pmic = rdev_get_drvdata(dev);
return tps65912_vsel_to_uv_ldo(vsel);
}
-static int tps65912_set_voltage_ldo_sel(struct regulator_dev *dev,
- unsigned selector)
-{
- struct tps65912_reg *pmic = rdev_get_drvdata(dev);
- struct tps65912 *mfd = pmic->mfd;
- int id = rdev_get_id(dev), reg, value;
-
- reg = tps65912_get_sel_register(pmic, id);
- value = tps65912_reg_read(mfd, reg);
- value &= 0xC0;
- return tps65912_reg_write(mfd, reg, selector | value);
-}
-
static int tps65912_list_voltage_ldo(struct regulator_dev *dev,
unsigned selector)
{
.set_mode = tps65912_set_mode,
.get_mode = tps65912_get_mode,
.get_voltage = tps65912_get_voltage_dcdc,
- .set_voltage_sel = tps65912_set_voltage_dcdc_sel,
+ .set_voltage_sel = tps65912_set_voltage_sel,
.list_voltage = tps65912_list_voltage_dcdc,
};
.enable = tps65912_reg_enable,
.disable = tps65912_reg_disable,
.get_voltage = tps65912_get_voltage_ldo,
- .set_voltage_sel = tps65912_set_voltage_ldo_sel,
+ .set_voltage_sel = tps65912_set_voltage_sel,
.list_voltage = tps65912_list_voltage_ldo,
};