提交 7c842a1d 编写于 作者: A Axel Lin 提交者: Mark Brown

regulator: tps6507x: Convert to get_voltage_sel

Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 85960e7b
...@@ -283,7 +283,7 @@ static int tps6507x_pmic_disable(struct regulator_dev *dev) ...@@ -283,7 +283,7 @@ static int tps6507x_pmic_disable(struct regulator_dev *dev)
1 << shift); 1 << shift);
} }
static int tps6507x_pmic_get_voltage(struct regulator_dev *dev) static int tps6507x_pmic_get_voltage_sel(struct regulator_dev *dev)
{ {
struct tps6507x_pmic *tps = rdev_get_drvdata(dev); struct tps6507x_pmic *tps = rdev_get_drvdata(dev);
int data, rid = rdev_get_id(dev); int data, rid = rdev_get_id(dev);
...@@ -325,7 +325,7 @@ static int tps6507x_pmic_get_voltage(struct regulator_dev *dev) ...@@ -325,7 +325,7 @@ static int tps6507x_pmic_get_voltage(struct regulator_dev *dev)
return data; return data;
data &= mask; data &= mask;
return tps->info[rid]->table[data] * 1000; return data;
} }
static int tps6507x_pmic_set_voltage_sel(struct regulator_dev *dev, static int tps6507x_pmic_set_voltage_sel(struct regulator_dev *dev,
...@@ -395,7 +395,7 @@ static struct regulator_ops tps6507x_pmic_ops = { ...@@ -395,7 +395,7 @@ static struct regulator_ops tps6507x_pmic_ops = {
.is_enabled = tps6507x_pmic_is_enabled, .is_enabled = tps6507x_pmic_is_enabled,
.enable = tps6507x_pmic_enable, .enable = tps6507x_pmic_enable,
.disable = tps6507x_pmic_disable, .disable = tps6507x_pmic_disable,
.get_voltage = tps6507x_pmic_get_voltage, .get_voltage_sel = tps6507x_pmic_get_voltage_sel,
.set_voltage_sel = tps6507x_pmic_set_voltage_sel, .set_voltage_sel = tps6507x_pmic_set_voltage_sel,
.list_voltage = tps6507x_pmic_list_voltage, .list_voltage = tps6507x_pmic_list_voltage,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册