regulator: Rename regulator_set_optimum_mode
authorBjorn Andersson <bjorn.andersson@sonymobile.com>
Thu, 12 Feb 2015 03:35:27 +0000 (19:35 -0800)
committerMark Brown <broonie@kernel.org>
Mon, 9 Mar 2015 18:32:25 +0000 (18:32 +0000)
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>
Documentation/power/regulator/consumer.txt
drivers/regulator/core.c
include/linux/regulator/consumer.h

index 8afb236ca7653ed694af2b35e49eadbabd496152..e51564c1a140915c0646c81f8aae562f8d4baf68 100644 (file)
@@ -137,7 +137,7 @@ Indirect operating mode control.
 Consumer drivers can request a change in their supply regulator operating mode
 by calling :-
 
-int regulator_set_optimum_mode(struct regulator *regulator, int load_uA);
+int regulator_set_load(struct regulator *regulator, int load_uA);
 
 This will cause the core to recalculate the total load on the regulator (based
 on all its consumers) and change operating mode (if necessary and permitted)
index b899947d839d87b03608d1f9bf4b4208cf57aa01..03088f9c3d4f8e3a92063393f768c0543cc70f2d 100644 (file)
@@ -2994,7 +2994,7 @@ unsigned int regulator_get_mode(struct regulator *regulator)
 EXPORT_SYMBOL_GPL(regulator_get_mode);
 
 /**
- * regulator_set_optimum_mode - set regulator optimum operating mode
+ * regulator_set_load - set regulator load
  * @regulator: regulator source
  * @uA_load: load current
  *
@@ -3017,9 +3017,9 @@ EXPORT_SYMBOL_GPL(regulator_get_mode);
  * DRMS will sum the total requested load on the regulator and change
  * to the most efficient operating mode if platform constraints allow.
  *
- * Returns the new regulator mode or error.
+ * On error a negative errno is returned.
  */
-int regulator_set_optimum_mode(struct regulator *regulator, int uA_load)
+int regulator_set_load(struct regulator *regulator, int uA_load)
 {
        struct regulator_dev *rdev = regulator->rdev;
        int ret;
@@ -3031,7 +3031,7 @@ int regulator_set_optimum_mode(struct regulator *regulator, int uA_load)
 
        return ret;
 }
-EXPORT_SYMBOL_GPL(regulator_set_optimum_mode);
+EXPORT_SYMBOL_GPL(regulator_set_load);
 
 /**
  * regulator_allow_bypass - allow the regulator to go into bypass mode
index d17e1ff7ad019987d4c4f944dd3a6b20aa571807..6d4e9d2289f02ae1d0e1986bb217b5f6512f6383 100644 (file)
@@ -238,7 +238,7 @@ int regulator_get_current_limit(struct regulator *regulator);
 
 int regulator_set_mode(struct regulator *regulator, unsigned int mode);
 unsigned int regulator_get_mode(struct regulator *regulator);
-int regulator_set_optimum_mode(struct regulator *regulator, int load_uA);
+int regulator_set_load(struct regulator *regulator, int load_uA);
 
 int regulator_allow_bypass(struct regulator *regulator, bool allow);
 
@@ -479,8 +479,7 @@ static inline unsigned int regulator_get_mode(struct regulator *regulator)
        return REGULATOR_MODE_NORMAL;
 }
 
-static inline int regulator_set_optimum_mode(struct regulator *regulator,
-                                       int load_uA)
+static inline int regulator_set_load(struct regulator *regulator, int load_uA)
 {
        return REGULATOR_MODE_NORMAL;
 }
@@ -555,4 +554,11 @@ static inline int regulator_is_supported_voltage_tol(struct regulator *regulator
                                              target_uV + tol_uV);
 }
 
+/* TEMP: Wrapper to keep bisectability */
+static inline int regulator_set_optimum_mode(struct regulator *regulator,
+                                            int load_uA)
+{
+       return regulator_set_load(regulator, load_uA);
+}
+
 #endif