diff options
| author | Mark Brown <broonie@linaro.org> | 2013-10-24 06:11:32 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2013-10-24 06:11:32 -0400 |
| commit | 420118d48311e0c4ef4aace5aede35079ecc2412 (patch) | |
| tree | a4affbc11b9271d786b9c9e5711b1e7dc873d3e8 /include/linux/regulator | |
| parent | 2a2bec6554e9e9d0ae351575ca1f72df1fa0f15f (diff) | |
| parent | 32dadef2190efd2e06331825b11881daf100d6d9 (diff) | |
Merge remote-tracking branch 'regulator/topic/alias' into regulator-next
Diffstat (limited to 'include/linux/regulator')
| -rw-r--r-- | include/linux/regulator/consumer.h | 79 | ||||
| -rw-r--r-- | include/linux/regulator/driver.h | 5 |
2 files changed, 84 insertions, 0 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 27be915caa96..e530681bea70 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
| @@ -146,6 +146,32 @@ struct regulator *__must_check devm_regulator_get_optional(struct device *dev, | |||
| 146 | void regulator_put(struct regulator *regulator); | 146 | void regulator_put(struct regulator *regulator); |
| 147 | void devm_regulator_put(struct regulator *regulator); | 147 | void devm_regulator_put(struct regulator *regulator); |
| 148 | 148 | ||
| 149 | int regulator_register_supply_alias(struct device *dev, const char *id, | ||
| 150 | struct device *alias_dev, | ||
| 151 | const char *alias_id); | ||
| 152 | void regulator_unregister_supply_alias(struct device *dev, const char *id); | ||
| 153 | |||
| 154 | int regulator_bulk_register_supply_alias(struct device *dev, const char **id, | ||
| 155 | struct device *alias_dev, | ||
| 156 | const char **alias_id, int num_id); | ||
| 157 | void regulator_bulk_unregister_supply_alias(struct device *dev, | ||
| 158 | const char **id, int num_id); | ||
| 159 | |||
| 160 | int devm_regulator_register_supply_alias(struct device *dev, const char *id, | ||
| 161 | struct device *alias_dev, | ||
| 162 | const char *alias_id); | ||
| 163 | void devm_regulator_unregister_supply_alias(struct device *dev, | ||
| 164 | const char *id); | ||
| 165 | |||
| 166 | int devm_regulator_bulk_register_supply_alias(struct device *dev, | ||
| 167 | const char **id, | ||
| 168 | struct device *alias_dev, | ||
| 169 | const char **alias_id, | ||
| 170 | int num_id); | ||
| 171 | void devm_regulator_bulk_unregister_supply_alias(struct device *dev, | ||
| 172 | const char **id, | ||
| 173 | int num_id); | ||
| 174 | |||
| 149 | /* regulator output control and status */ | 175 | /* regulator output control and status */ |
| 150 | int __must_check regulator_enable(struct regulator *regulator); | 176 | int __must_check regulator_enable(struct regulator *regulator); |
| 151 | int regulator_disable(struct regulator *regulator); | 177 | int regulator_disable(struct regulator *regulator); |
| @@ -250,6 +276,59 @@ static inline void devm_regulator_put(struct regulator *regulator) | |||
| 250 | { | 276 | { |
| 251 | } | 277 | } |
| 252 | 278 | ||
| 279 | static inline int regulator_register_supply_alias(struct device *dev, | ||
| 280 | const char *id, | ||
| 281 | struct device *alias_dev, | ||
| 282 | const char *alias_id) | ||
| 283 | { | ||
| 284 | return 0; | ||
| 285 | } | ||
| 286 | |||
| 287 | static inline void regulator_unregister_supply_alias(struct device *dev, | ||
| 288 | const char *id) | ||
| 289 | { | ||
| 290 | } | ||
| 291 | |||
| 292 | static inline int regulator_bulk_register_supply_alias(struct device *dev, | ||
| 293 | const char **id, | ||
| 294 | struct device *alias_dev, | ||
| 295 | const char **alias_id, | ||
| 296 | int num_id) | ||
| 297 | { | ||
| 298 | return 0; | ||
| 299 | } | ||
| 300 | |||
| 301 | static inline void regulator_bulk_unregister_supply_alias(struct device *dev, | ||
| 302 | const char **id, | ||
| 303 | int num_id) | ||
| 304 | { | ||
| 305 | } | ||
| 306 | |||
| 307 | static inline int devm_regulator_register_supply_alias(struct device *dev, | ||
| 308 | const char *id, | ||
| 309 | struct device *alias_dev, | ||
| 310 | const char *alias_id) | ||
| 311 | { | ||
| 312 | return 0; | ||
| 313 | } | ||
| 314 | |||
| 315 | static inline void devm_regulator_unregister_supply_alias(struct device *dev, | ||
| 316 | const char *id) | ||
| 317 | { | ||
| 318 | } | ||
| 319 | |||
| 320 | static inline int devm_regulator_bulk_register_supply_alias( | ||
| 321 | struct device *dev, const char **id, struct device *alias_dev, | ||
| 322 | const char **alias_id, int num_id) | ||
| 323 | { | ||
| 324 | return 0; | ||
| 325 | } | ||
| 326 | |||
| 327 | static inline void devm_regulator_bulk_unregister_supply_alias( | ||
| 328 | struct device *dev, const char **id, int num_id) | ||
| 329 | { | ||
| 330 | } | ||
| 331 | |||
| 253 | static inline int regulator_enable(struct regulator *regulator) | 332 | static inline int regulator_enable(struct regulator *regulator) |
| 254 | { | 333 | { |
| 255 | return 0; | 334 | return 0; |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 9bdad43ad228..779b877e0fa1 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -336,7 +336,12 @@ struct regulator_dev { | |||
| 336 | struct regulator_dev * | 336 | struct regulator_dev * |
| 337 | regulator_register(const struct regulator_desc *regulator_desc, | 337 | regulator_register(const struct regulator_desc *regulator_desc, |
| 338 | const struct regulator_config *config); | 338 | const struct regulator_config *config); |
| 339 | struct regulator_dev * | ||
| 340 | devm_regulator_register(struct device *dev, | ||
| 341 | const struct regulator_desc *regulator_desc, | ||
| 342 | const struct regulator_config *config); | ||
| 339 | void regulator_unregister(struct regulator_dev *rdev); | 343 | void regulator_unregister(struct regulator_dev *rdev); |
| 344 | void devm_regulator_unregister(struct device *dev, struct regulator_dev *rdev); | ||
| 340 | 345 | ||
| 341 | int regulator_notifier_call_chain(struct regulator_dev *rdev, | 346 | int regulator_notifier_call_chain(struct regulator_dev *rdev, |
| 342 | unsigned long event, void *data); | 347 | unsigned long event, void *data); |
