Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56a942e9 authored by Mark Brown's avatar Mark Brown
Browse files

regulator: lp8755: Provide map_voltage()



Improve performance when setting voltages by avoiding a scan through the
selectors when we can simply calculate the selector we want.

Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 8bb495e3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -229,6 +229,7 @@ static int lp8755_buck_set_ramp(struct regulator_dev *rdev, int ramp)
}

static struct regulator_ops lp8755_buck_ops = {
	.map_voltage = regulator_map_voltage_linear,
	.list_voltage = regulator_list_voltage_linear,
	.set_voltage_sel = regulator_set_voltage_sel_regmap,
	.get_voltage_sel = regulator_get_voltage_sel_regmap,