diff options
author | Bjorn Andersson <bjorn.andersson@sonymobile.com> | 2015-02-11 22:35:27 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-09 14:32:25 -0400 |
commit | e39ce48f5362df9f87400b4909a6fb0f51b109ac (patch) | |
tree | 77e7ee654c85a19cf22cc44e6cfeb199ec2bce20 | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) |
regulator: Rename regulator_set_optimum_mode
Rename the regulator_set_optimum_mode() function regulator_set_load() to
better represent what's going on.
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | Documentation/power/regulator/consumer.txt | 2 | ||||
-rw-r--r-- | drivers/regulator/core.c | 8 | ||||
-rw-r--r-- | include/linux/regulator/consumer.h | 12 |
3 files changed, 14 insertions, 8 deletions
diff --git a/Documentation/power/regulator/consumer.txt b/Documentation/power/regulator/consumer.txt index 8afb236ca765..e51564c1a140 100644 --- a/Documentation/power/regulator/consumer.txt +++ b/Documentation/power/regulator/consumer.txt | |||
@@ -137,7 +137,7 @@ Indirect operating mode control. | |||
137 | Consumer drivers can request a change in their supply regulator operating mode | 137 | Consumer drivers can request a change in their supply regulator operating mode |
138 | by calling :- | 138 | by calling :- |
139 | 139 | ||
140 | int regulator_set_optimum_mode(struct regulator *regulator, int load_uA); | 140 | int regulator_set_load(struct regulator *regulator, int load_uA); |
141 | 141 | ||
142 | This will cause the core to recalculate the total load on the regulator (based | 142 | This will cause the core to recalculate the total load on the regulator (based |
143 | on all its consumers) and change operating mode (if necessary and permitted) | 143 | on all its consumers) and change operating mode (if necessary and permitted) |
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index b899947d839d..03088f9c3d4f 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -2994,7 +2994,7 @@ unsigned int regulator_get_mode(struct regulator *regulator) | |||
2994 | EXPORT_SYMBOL_GPL(regulator_get_mode); | 2994 | EXPORT_SYMBOL_GPL(regulator_get_mode); |
2995 | 2995 | ||
2996 | /** | 2996 | /** |
2997 | * regulator_set_optimum_mode - set regulator optimum operating mode | 2997 | * regulator_set_load - set regulator load |
2998 | * @regulator: regulator source | 2998 | * @regulator: regulator source |
2999 | * @uA_load: load current | 2999 | * @uA_load: load current |
3000 | * | 3000 | * |
@@ -3017,9 +3017,9 @@ EXPORT_SYMBOL_GPL(regulator_get_mode); | |||
3017 | * DRMS will sum the total requested load on the regulator and change | 3017 | * DRMS will sum the total requested load on the regulator and change |
3018 | * to the most efficient operating mode if platform constraints allow. | 3018 | * to the most efficient operating mode if platform constraints allow. |
3019 | * | 3019 | * |
3020 | * Returns the new regulator mode or error. | 3020 | * On error a negative errno is returned. |
3021 | */ | 3021 | */ |
3022 | int regulator_set_optimum_mode(struct regulator *regulator, int uA_load) | 3022 | int regulator_set_load(struct regulator *regulator, int uA_load) |
3023 | { | 3023 | { |
3024 | struct regulator_dev *rdev = regulator->rdev; | 3024 | struct regulator_dev *rdev = regulator->rdev; |
3025 | int ret; | 3025 | int ret; |
@@ -3031,7 +3031,7 @@ int regulator_set_optimum_mode(struct regulator *regulator, int uA_load) | |||
3031 | 3031 | ||
3032 | return ret; | 3032 | return ret; |
3033 | } | 3033 | } |
3034 | EXPORT_SYMBOL_GPL(regulator_set_optimum_mode); | 3034 | EXPORT_SYMBOL_GPL(regulator_set_load); |
3035 | 3035 | ||
3036 | /** | 3036 | /** |
3037 | * regulator_allow_bypass - allow the regulator to go into bypass mode | 3037 | * regulator_allow_bypass - allow the regulator to go into bypass mode |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index d17e1ff7ad01..6d4e9d2289f0 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -238,7 +238,7 @@ int regulator_get_current_limit(struct regulator *regulator); | |||
238 | 238 | ||
239 | int regulator_set_mode(struct regulator *regulator, unsigned int mode); | 239 | int regulator_set_mode(struct regulator *regulator, unsigned int mode); |
240 | unsigned int regulator_get_mode(struct regulator *regulator); | 240 | unsigned int regulator_get_mode(struct regulator *regulator); |
241 | int regulator_set_optimum_mode(struct regulator *regulator, int load_uA); | 241 | int regulator_set_load(struct regulator *regulator, int load_uA); |
242 | 242 | ||
243 | int regulator_allow_bypass(struct regulator *regulator, bool allow); | 243 | int regulator_allow_bypass(struct regulator *regulator, bool allow); |
244 | 244 | ||
@@ -479,8 +479,7 @@ static inline unsigned int regulator_get_mode(struct regulator *regulator) | |||
479 | return REGULATOR_MODE_NORMAL; | 479 | return REGULATOR_MODE_NORMAL; |
480 | } | 480 | } |
481 | 481 | ||
482 | static inline int regulator_set_optimum_mode(struct regulator *regulator, | 482 | static inline int regulator_set_load(struct regulator *regulator, int load_uA) |
483 | int load_uA) | ||
484 | { | 483 | { |
485 | return REGULATOR_MODE_NORMAL; | 484 | return REGULATOR_MODE_NORMAL; |
486 | } | 485 | } |
@@ -555,4 +554,11 @@ static inline int regulator_is_supported_voltage_tol(struct regulator *regulator | |||
555 | target_uV + tol_uV); | 554 | target_uV + tol_uV); |
556 | } | 555 | } |
557 | 556 | ||
557 | /* TEMP: Wrapper to keep bisectability */ | ||
558 | static inline int regulator_set_optimum_mode(struct regulator *regulator, | ||
559 | int load_uA) | ||
560 | { | ||
561 | return regulator_set_load(regulator, load_uA); | ||
562 | } | ||
563 | |||
558 | #endif | 564 | #endif |