* [PATCH] regulator: core: Use map_voltage_linear_range by default for list_voltage_linear_range
@ 2014-05-24 3:10 Axel Lin
2014-05-26 13:37 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2014-05-24 3:10 UTC (permalink / raw)
To: Mark Brown; +Cc: Liam Girdwood, linux-kernel
Use map_voltage_linear_range() if list_voltage_linear_range() is in use and
nothing is set.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index b97ffd2..7399cbf 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2321,6 +2321,10 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev,
regulator_list_voltage_linear)
ret = regulator_map_voltage_linear(rdev,
min_uV, max_uV);
+ else if (rdev->desc->ops->list_voltage ==
+ regulator_list_voltage_linear_range)
+ ret = regulator_map_voltage_linear_range(rdev,
+ min_uV, max_uV);
else
ret = regulator_map_voltage_iterate(rdev,
min_uV, max_uV);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-26 13:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-24 3:10 [PATCH] regulator: core: Use map_voltage_linear_range by default for list_voltage_linear_range Axel Lin
2014-05-26 13:37 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox