aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator/consumer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/regulator/consumer.h')
-rw-r--r--include/linux/regulator/consumer.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index f2698a0edfc4..4ed1b30ac5fc 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -35,7 +35,8 @@
35#ifndef __LINUX_REGULATOR_CONSUMER_H_ 35#ifndef __LINUX_REGULATOR_CONSUMER_H_
36#define __LINUX_REGULATOR_CONSUMER_H_ 36#define __LINUX_REGULATOR_CONSUMER_H_
37 37
38#include <linux/device.h> 38struct device;
39struct notifier_block;
39 40
40/* 41/*
41 * Regulator operating modes. 42 * Regulator operating modes.
@@ -132,9 +133,12 @@ struct regulator_bulk_data {
132/* regulator get and put */ 133/* regulator get and put */
133struct regulator *__must_check regulator_get(struct device *dev, 134struct regulator *__must_check regulator_get(struct device *dev,
134 const char *id); 135 const char *id);
136struct regulator *__must_check devm_regulator_get(struct device *dev,
137 const char *id);
135struct regulator *__must_check regulator_get_exclusive(struct device *dev, 138struct regulator *__must_check regulator_get_exclusive(struct device *dev,
136 const char *id); 139 const char *id);
137void regulator_put(struct regulator *regulator); 140void regulator_put(struct regulator *regulator);
141void devm_regulator_put(struct regulator *regulator);
138 142
139/* regulator output control and status */ 143/* regulator output control and status */
140int regulator_enable(struct regulator *regulator); 144int regulator_enable(struct regulator *regulator);
@@ -145,6 +149,8 @@ int regulator_disable_deferred(struct regulator *regulator, int ms);
145 149
146int regulator_bulk_get(struct device *dev, int num_consumers, 150int regulator_bulk_get(struct device *dev, int num_consumers,
147 struct regulator_bulk_data *consumers); 151 struct regulator_bulk_data *consumers);
152int devm_regulator_bulk_get(struct device *dev, int num_consumers,
153 struct regulator_bulk_data *consumers);
148int regulator_bulk_enable(int num_consumers, 154int regulator_bulk_enable(int num_consumers,
149 struct regulator_bulk_data *consumers); 155 struct regulator_bulk_data *consumers);
150int regulator_bulk_disable(int num_consumers, 156int regulator_bulk_disable(int num_consumers,
@@ -200,10 +206,21 @@ static inline struct regulator *__must_check regulator_get(struct device *dev,
200 */ 206 */
201 return NULL; 207 return NULL;
202} 208}
209
210static inline struct regulator *__must_check
211devm_regulator_get(struct device *dev, const char *id)
212{
213 return NULL;
214}
215
203static inline void regulator_put(struct regulator *regulator) 216static inline void regulator_put(struct regulator *regulator)
204{ 217{
205} 218}
206 219
220static inline void devm_regulator_put(struct regulator *regulator)
221{
222}
223
207static inline int regulator_enable(struct regulator *regulator) 224static inline int regulator_enable(struct regulator *regulator)
208{ 225{
209 return 0; 226 return 0;
@@ -237,6 +254,12 @@ static inline int regulator_bulk_get(struct device *dev,
237 return 0; 254 return 0;
238} 255}
239 256
257static inline int devm_regulator_bulk_get(struct device *dev, int num_consumers,
258 struct regulator_bulk_data *consumers)
259{
260 return 0;
261}
262
240static inline int regulator_bulk_enable(int num_consumers, 263static inline int regulator_bulk_enable(int num_consumers,
241 struct regulator_bulk_data *consumers) 264 struct regulator_bulk_data *consumers)
242{ 265{