regulator: Add regulator_bulk_set_voltage
Add a convenience API to set the voltage on multiple consumers
stored in a struct regulator_bulk_data[] in one API call.
Signed-off-by: Justin Paupore <jpaupore@codeaurora.org>
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index d210407..fb5d4e4 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -114,6 +114,10 @@
* using the bulk regulator APIs.
* @consumer: The regulator consumer for the supply. This will be managed
* by the bulk API.
+ * @min_uV: The minimum requested voltage for the regulator (in microvolts),
+ * or 0 to not set a voltage.
+ * @max_uV: The maximum requested voltage for the regulator (in microvolts),
+ * or 0 to use @min_uV.
*
* The regulator APIs provide a series of regulator_bulk_() API calls as
* a convenience to consumers which require multiple supplies. This
@@ -122,6 +126,8 @@
struct regulator_bulk_data {
const char *supply;
struct regulator *consumer;
+ int min_uV;
+ int max_uV;
};
#if defined(CONFIG_REGULATOR)
@@ -143,6 +149,8 @@
struct regulator_bulk_data *consumers);
int regulator_bulk_enable(int num_consumers,
struct regulator_bulk_data *consumers);
+int regulator_bulk_set_voltage(int num_consumers,
+ struct regulator_bulk_data *consumers);
int regulator_bulk_disable(int num_consumers,
struct regulator_bulk_data *consumers);
void regulator_bulk_free(int num_consumers,