diff options
| author | Mark Brown <broonie@kernel.org> | 2014-11-26 14:42:41 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2014-11-26 14:42:41 -0500 |
| commit | f9fbc21d03d719a10cbffe19870092592bf60d56 (patch) | |
| tree | 3f0ed48bd94d1957bd03fbebdc9779270840adc8 /include/linux | |
| parent | a26ed45c912d46cedac5f15c2872aa7e462fcdf1 (diff) | |
| parent | 5e5e3a42c653c5ef1c281651f1882411601129bd (diff) | |
Merge branch 'topic/suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-max77802
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/regulator/driver.h | 4 | ||||
| -rw-r--r-- | include/linux/regulator/of_regulator.h | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index fc0ee0ce8325..73dd073afef5 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -243,6 +243,8 @@ enum regulator_type { | |||
| 243 | * | 243 | * |
| 244 | * @enable_time: Time taken for initial enable of regulator (in uS). | 244 | * @enable_time: Time taken for initial enable of regulator (in uS). |
| 245 | * @off_on_delay: guard time (in uS), before re-enabling a regulator | 245 | * @off_on_delay: guard time (in uS), before re-enabling a regulator |
| 246 | * | ||
| 247 | * @of_map_mode: Maps a hardware mode defined in a DeviceTree to a standard mode | ||
| 246 | */ | 248 | */ |
| 247 | struct regulator_desc { | 249 | struct regulator_desc { |
| 248 | const char *name; | 250 | const char *name; |
| @@ -285,6 +287,8 @@ struct regulator_desc { | |||
| 285 | unsigned int enable_time; | 287 | unsigned int enable_time; |
| 286 | 288 | ||
| 287 | unsigned int off_on_delay; | 289 | unsigned int off_on_delay; |
| 290 | |||
| 291 | unsigned int (*of_map_mode)(unsigned int mode); | ||
| 288 | }; | 292 | }; |
| 289 | 293 | ||
| 290 | /** | 294 | /** |
diff --git a/include/linux/regulator/of_regulator.h b/include/linux/regulator/of_regulator.h index f9217965aaa3..763953f7e3b8 100644 --- a/include/linux/regulator/of_regulator.h +++ b/include/linux/regulator/of_regulator.h | |||
| @@ -6,24 +6,29 @@ | |||
| 6 | #ifndef __LINUX_OF_REG_H | 6 | #ifndef __LINUX_OF_REG_H |
| 7 | #define __LINUX_OF_REG_H | 7 | #define __LINUX_OF_REG_H |
| 8 | 8 | ||
| 9 | struct regulator_desc; | ||
| 10 | |||
| 9 | struct of_regulator_match { | 11 | struct of_regulator_match { |
| 10 | const char *name; | 12 | const char *name; |
| 11 | void *driver_data; | 13 | void *driver_data; |
| 12 | struct regulator_init_data *init_data; | 14 | struct regulator_init_data *init_data; |
| 13 | struct device_node *of_node; | 15 | struct device_node *of_node; |
| 16 | const struct regulator_desc *desc; | ||
| 14 | }; | 17 | }; |
| 15 | 18 | ||
| 16 | #if defined(CONFIG_OF) | 19 | #if defined(CONFIG_OF) |
| 17 | extern struct regulator_init_data | 20 | extern struct regulator_init_data |
| 18 | *of_get_regulator_init_data(struct device *dev, | 21 | *of_get_regulator_init_data(struct device *dev, |
| 19 | struct device_node *node); | 22 | struct device_node *node, |
| 23 | const struct regulator_desc *desc); | ||
| 20 | extern int of_regulator_match(struct device *dev, struct device_node *node, | 24 | extern int of_regulator_match(struct device *dev, struct device_node *node, |
| 21 | struct of_regulator_match *matches, | 25 | struct of_regulator_match *matches, |
| 22 | unsigned int num_matches); | 26 | unsigned int num_matches); |
| 23 | #else | 27 | #else |
| 24 | static inline struct regulator_init_data | 28 | static inline struct regulator_init_data |
| 25 | *of_get_regulator_init_data(struct device *dev, | 29 | *of_get_regulator_init_data(struct device *dev, |
| 26 | struct device_node *node) | 30 | struct device_node *node, |
| 31 | const struct regulator_desc *desc) | ||
| 27 | { | 32 | { |
| 28 | return NULL; | 33 | return NULL; |
| 29 | } | 34 | } |
