summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDavid Collins <collinsd@codeaurora.org>2015-04-09 14:44:15 -0700
committerRohit Vaswani <rvaswani@codeaurora.org>2016-03-01 12:22:36 -0800
commit9fbac0b19d530ef9980e83f68c1ebb0a7cd9d9a3 (patch)
treeee3278d55456d60c49ae9a62eac937389bc69a05 /include/linux
parentdb58e9bdc318201eca4eb5a457a6d4ea8d1857b5 (diff)
regulator: core: add regulator_list_corner_voltage function
Introduce a regulator_list_corner_voltage function for consumers that need to know the maximum absolute voltage that may be physically configured when a regulator is operating at a given voltage corner. Change-Id: Ide7a0b502796774fcad01f5cb5679f0938c72f96 Signed-off-by: David Collins <collinsd@codeaurora.org> [adharmap: fixed merge conflicts] Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org> Conflicts: include/linux/regulator/consumer.h
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/regulator/consumer.h6
-rw-r--r--include/linux/regulator/driver.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 7812e7fca3f8..734ae72d3c16 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -234,6 +234,7 @@ void regulator_bulk_free(int num_consumers,
int regulator_can_change_voltage(struct regulator *regulator);
int regulator_count_voltages(struct regulator *regulator);
int regulator_list_voltage(struct regulator *regulator, unsigned selector);
+int regulator_list_corner_voltage(struct regulator *regulator, int corner);
int regulator_is_supported_voltage(struct regulator *regulator,
int min_uV, int max_uV);
unsigned int regulator_get_linear_step(struct regulator *regulator);
@@ -566,6 +567,11 @@ static inline int regulator_list_voltage(struct regulator *regulator, unsigned s
return -EINVAL;
}
+static inline int regulator_list_corner_voltage(struct regulator *regulator,
+ int corner)
+{
+ return -EINVAL;
+}
#endif
static inline int regulator_set_voltage_triplet(struct regulator *regulator,
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 2593c9a44787..72266ea83d82 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -88,6 +88,10 @@ struct regulator_linear_range {
* if the selector indicates a voltage that is unusable on this system;
* or negative errno. Selectors range from zero to one less than
* regulator_desc.n_voltages. Voltages may be reported in any order.
+ * @list_corner_voltage: Return the maximum voltage in microvolts that
+ * that can be physically configured for the regulator when operating at
+ * the specified voltage corner or a negative errno if the corner value
+ * can't be used on this system.
*
* @set_current_limit: Configure a limit for a current-limited regulator.
* The driver should select the current closest to max_uA.
@@ -134,6 +138,7 @@ struct regulator_ops {
/* enumerate supported voltages */
int (*list_voltage) (struct regulator_dev *, unsigned selector);
+ int (*list_corner_voltage)(struct regulator_dev *, int corner);
/* get/set regulator voltage */
int (*set_voltage) (struct regulator_dev *, int min_uV, int max_uV,