mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
regulator: anatop: Convert to regulator_list_voltage_linear()
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
8029a00686
commit
0713e6abf3
1 changed files with 3 additions and 12 deletions
|
@ -94,21 +94,10 @@ static int anatop_get_voltage_sel(struct regulator_dev *reg)
|
|||
return val - anatop_reg->min_bit_val;
|
||||
}
|
||||
|
||||
static int anatop_list_voltage(struct regulator_dev *reg, unsigned selector)
|
||||
{
|
||||
struct anatop_regulator *anatop_reg = rdev_get_drvdata(reg);
|
||||
int uv;
|
||||
|
||||
uv = anatop_reg->min_voltage + selector * 25000;
|
||||
dev_dbg(®->dev, "vddio = %d, selector = %u\n", uv, selector);
|
||||
|
||||
return uv;
|
||||
}
|
||||
|
||||
static struct regulator_ops anatop_rops = {
|
||||
.set_voltage = anatop_set_voltage,
|
||||
.get_voltage_sel = anatop_get_voltage_sel,
|
||||
.list_voltage = anatop_list_voltage,
|
||||
.list_voltage = regulator_list_voltage_linear,
|
||||
};
|
||||
|
||||
static int __devinit anatop_regulator_probe(struct platform_device *pdev)
|
||||
|
@ -176,6 +165,8 @@ static int __devinit anatop_regulator_probe(struct platform_device *pdev)
|
|||
|
||||
rdesc->n_voltages = (sreg->max_voltage - sreg->min_voltage)
|
||||
/ 25000 + 1;
|
||||
rdesc->min_uV = sreg->min_voltage;
|
||||
rdesc->uV_step = 25000;
|
||||
|
||||
config.dev = &pdev->dev;
|
||||
config.init_data = initdata;
|
||||
|
|
Loading…
Reference in a new issue