lkml.org 
[lkml]   [2012]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] regulator: max77686: Use regulator_map_voltage_linear for simple linear mappings
From
Date
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




\
 
 \ /
  Last update: 2012-06-03 17:21    [W:0.054 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site