* [PATCH] regulator: max77686: Use regulator_map_voltage_linear for simple linear mappings
@ 2012-06-03 14:46 Axel Lin
2012-06-03 19:10 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-06-03 14:46 UTC (permalink / raw)
To: linux-kernel
Cc: Chiwoong Byun, Jonghwa Lee, Myungjoo Ham, Kyungmin Park,
Yadwinder Singh Brar, Mark Brown, Liam Girdwood
Both max77686_ops and max77686_buck_dvs_ops use simple linear voltage maps.
Thus use regulator_map_voltage_linear is more efficient than using the defult
regulator_map_voltage_iterate.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/regulator/max77686.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c
index 70046f8..4e9f4f3 100644
--- a/drivers/regulator/max77686.c
+++ b/drivers/regulator/max77686.c
@@ -90,6 +90,7 @@ static int max77686_set_voltage_time_sel(struct regulator_dev *rdev,
static struct regulator_ops max77686_ops = {
.list_voltage = regulator_list_voltage_linear,
+ .map_voltage = regulator_map_voltage_linear,
.is_enabled = regulator_is_enabled_regmap,
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
@@ -100,6 +101,7 @@ static struct regulator_ops max77686_ops = {
static struct regulator_ops max77686_buck_dvs_ops = {
.list_voltage = regulator_list_voltage_linear,
+ .map_voltage = regulator_map_voltage_linear,
.is_enabled = regulator_is_enabled_regmap,
.enable = regulator_enable_regmap,
.disable = regulator_disable_regmap,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: max77686: Use regulator_map_voltage_linear for simple linear mappings
2012-06-03 14:46 [PATCH] regulator: max77686: Use regulator_map_voltage_linear for simple linear mappings Axel Lin
@ 2012-06-03 19:10 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-06-03 19:10 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel, Chiwoong Byun, Jonghwa Lee, Myungjoo Ham,
Kyungmin Park, Yadwinder Singh Brar, Liam Girdwood
[-- Attachment #1: Type: text/plain, Size: 447 bytes --]
On Sun, Jun 03, 2012 at 10:46:14PM +0800, Axel Lin wrote:
> Both max77686_ops and max77686_buck_dvs_ops use simple linear voltage maps.
> Thus use regulator_map_voltage_linear is more efficient than using the defult
> regulator_map_voltage_iterate.
I've applied this and your other patch but really what should happen
here is that the default should get smarter and use map_voltage_linear()
if list_voltage_linear() is in use and nothing is set.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-03 19:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-03 14:46 [PATCH] regulator: max77686: Use regulator_map_voltage_linear for simple linear mappings Axel Lin
2012-06-03 19:10 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox