diff options
Diffstat (limited to 'include/linux/regulator/consumer.h')
-rw-r--r-- | include/linux/regulator/consumer.h | 25 |
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> | 38 | struct device; |
39 | struct 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 */ |
133 | struct regulator *__must_check regulator_get(struct device *dev, | 134 | struct regulator *__must_check regulator_get(struct device *dev, |
134 | const char *id); | 135 | const char *id); |
136 | struct regulator *__must_check devm_regulator_get(struct device *dev, | ||
137 | const char *id); | ||
135 | struct regulator *__must_check regulator_get_exclusive(struct device *dev, | 138 | struct regulator *__must_check regulator_get_exclusive(struct device *dev, |
136 | const char *id); | 139 | const char *id); |
137 | void regulator_put(struct regulator *regulator); | 140 | void regulator_put(struct regulator *regulator); |
141 | void devm_regulator_put(struct regulator *regulator); | ||
138 | 142 | ||
139 | /* regulator output control and status */ | 143 | /* regulator output control and status */ |
140 | int regulator_enable(struct regulator *regulator); | 144 | int regulator_enable(struct regulator *regulator); |
@@ -145,6 +149,8 @@ int regulator_disable_deferred(struct regulator *regulator, int ms); | |||
145 | 149 | ||
146 | int regulator_bulk_get(struct device *dev, int num_consumers, | 150 | int regulator_bulk_get(struct device *dev, int num_consumers, |
147 | struct regulator_bulk_data *consumers); | 151 | struct regulator_bulk_data *consumers); |
152 | int devm_regulator_bulk_get(struct device *dev, int num_consumers, | ||
153 | struct regulator_bulk_data *consumers); | ||
148 | int regulator_bulk_enable(int num_consumers, | 154 | int regulator_bulk_enable(int num_consumers, |
149 | struct regulator_bulk_data *consumers); | 155 | struct regulator_bulk_data *consumers); |
150 | int regulator_bulk_disable(int num_consumers, | 156 | int 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 | |||
210 | static inline struct regulator *__must_check | ||
211 | devm_regulator_get(struct device *dev, const char *id) | ||
212 | { | ||
213 | return NULL; | ||
214 | } | ||
215 | |||
203 | static inline void regulator_put(struct regulator *regulator) | 216 | static inline void regulator_put(struct regulator *regulator) |
204 | { | 217 | { |
205 | } | 218 | } |
206 | 219 | ||
220 | static inline void devm_regulator_put(struct regulator *regulator) | ||
221 | { | ||
222 | } | ||
223 | |||
207 | static inline int regulator_enable(struct regulator *regulator) | 224 | static 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 | ||
257 | static inline int devm_regulator_bulk_get(struct device *dev, int num_consumers, | ||
258 | struct regulator_bulk_data *consumers) | ||
259 | { | ||
260 | return 0; | ||
261 | } | ||
262 | |||
240 | static inline int regulator_bulk_enable(int num_consumers, | 263 | static inline int regulator_bulk_enable(int num_consumers, |
241 | struct regulator_bulk_data *consumers) | 264 | struct regulator_bulk_data *consumers) |
242 | { | 265 | { |