mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 07:01:57 +00:00
regulator: lp3971: Convert to use regulator_map_voltage_ascend
All regulators have ascendant voltage list in this driver. Thus use regulator_map_voltage_ascend is more efficient than the default regulator_map_voltage_iterate. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
fcf371ee56
commit
3e655618e1
@ -163,6 +163,7 @@ static int lp3971_ldo_set_voltage_sel(struct regulator_dev *dev,
|
|||||||
|
|
||||||
static struct regulator_ops lp3971_ldo_ops = {
|
static struct regulator_ops lp3971_ldo_ops = {
|
||||||
.list_voltage = regulator_list_voltage_table,
|
.list_voltage = regulator_list_voltage_table,
|
||||||
|
.map_voltage = regulator_map_voltage_ascend,
|
||||||
.is_enabled = lp3971_ldo_is_enabled,
|
.is_enabled = lp3971_ldo_is_enabled,
|
||||||
.enable = lp3971_ldo_enable,
|
.enable = lp3971_ldo_enable,
|
||||||
.disable = lp3971_ldo_disable,
|
.disable = lp3971_ldo_disable,
|
||||||
@ -236,6 +237,7 @@ static int lp3971_dcdc_set_voltage_sel(struct regulator_dev *dev,
|
|||||||
|
|
||||||
static struct regulator_ops lp3971_dcdc_ops = {
|
static struct regulator_ops lp3971_dcdc_ops = {
|
||||||
.list_voltage = regulator_list_voltage_table,
|
.list_voltage = regulator_list_voltage_table,
|
||||||
|
.map_voltage = regulator_map_voltage_ascend,
|
||||||
.is_enabled = lp3971_dcdc_is_enabled,
|
.is_enabled = lp3971_dcdc_is_enabled,
|
||||||
.enable = lp3971_dcdc_enable,
|
.enable = lp3971_dcdc_enable,
|
||||||
.disable = lp3971_dcdc_disable,
|
.disable = lp3971_dcdc_disable,
|
||||||
|
Loading…
Reference in New Issue
Block a user