diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-12 06:10:25 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-12 06:10:25 -0400 |
| commit | 5949a7e9ab2db04edaeee7c368eb4c99131f4629 (patch) | |
| tree | 13e8da5dc42cc62b9721659c41045d2c27c31cc3 /include/linux | |
| parent | 178e43aef2979525d7864daefd9499614e13800e (diff) | |
| parent | 411a2df5090ccb88f4c3726e4951ebed579fec11 (diff) | |
Merge remote-tracking branch 'regulator/topic/drivers' into regulator-next
Conflicts:
drivers/regulator/88pm8607.c (simple overlap with a bugfix in v3.4)
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/i2c/twl.h | 13 | ||||
| -rw-r--r-- | include/linux/mfd/tps6586x.h | 1 | ||||
| -rw-r--r-- | include/linux/regulator/of_regulator.h | 18 |
3 files changed, 30 insertions, 2 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 1f90de0cfdbe..3993477103a5 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
| @@ -171,8 +171,6 @@ static inline int twl_class_is_ ##class(void) \ | |||
| 171 | TWL_CLASS_IS(4030, TWL4030_CLASS_ID) | 171 | TWL_CLASS_IS(4030, TWL4030_CLASS_ID) |
| 172 | TWL_CLASS_IS(6030, TWL6030_CLASS_ID) | 172 | TWL_CLASS_IS(6030, TWL6030_CLASS_ID) |
| 173 | 173 | ||
| 174 | #define TWL6025_SUBCLASS BIT(4) /* TWL6025 has changed registers */ | ||
| 175 | |||
| 176 | /* | 174 | /* |
| 177 | * Read and write single 8-bit registers | 175 | * Read and write single 8-bit registers |
| 178 | */ | 176 | */ |
| @@ -746,6 +744,17 @@ struct twl_regulator_driver_data { | |||
| 746 | void *data; | 744 | void *data; |
| 747 | unsigned long features; | 745 | unsigned long features; |
| 748 | }; | 746 | }; |
| 747 | /* chip-specific feature flags, for twl_regulator_driver_data.features */ | ||
| 748 | #define TWL4030_VAUX2 BIT(0) /* pre-5030 voltage ranges */ | ||
| 749 | #define TPS_SUBSET BIT(1) /* tps659[23]0 have fewer LDOs */ | ||
| 750 | #define TWL5031 BIT(2) /* twl5031 has different registers */ | ||
| 751 | #define TWL6030_CLASS BIT(3) /* TWL6030 class */ | ||
| 752 | #define TWL6025_SUBCLASS BIT(4) /* TWL6025 has changed registers */ | ||
| 753 | #define TWL4030_ALLOW_UNSUPPORTED BIT(5) /* Some voltages are possible | ||
| 754 | * but not officially supported. | ||
| 755 | * This flag is necessary to | ||
| 756 | * enable them. | ||
| 757 | */ | ||
| 749 | 758 | ||
| 750 | /*----------------------------------------------------------------------*/ | 759 | /*----------------------------------------------------------------------*/ |
| 751 | 760 | ||
diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h index b19176eab44d..f350fd0ba1df 100644 --- a/include/linux/mfd/tps6586x.h +++ b/include/linux/mfd/tps6586x.h | |||
| @@ -68,6 +68,7 @@ struct tps6586x_subdev_info { | |||
| 68 | int id; | 68 | int id; |
| 69 | const char *name; | 69 | const char *name; |
| 70 | void *platform_data; | 70 | void *platform_data; |
| 71 | struct device_node *of_node; | ||
| 71 | }; | 72 | }; |
| 72 | 73 | ||
| 73 | struct tps6586x_platform_data { | 74 | struct tps6586x_platform_data { |
diff --git a/include/linux/regulator/of_regulator.h b/include/linux/regulator/of_regulator.h index 769704f296e5..f9217965aaa3 100644 --- a/include/linux/regulator/of_regulator.h +++ b/include/linux/regulator/of_regulator.h | |||
| @@ -6,10 +6,20 @@ | |||
| 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 of_regulator_match { | ||
| 10 | const char *name; | ||
| 11 | void *driver_data; | ||
| 12 | struct regulator_init_data *init_data; | ||
| 13 | struct device_node *of_node; | ||
| 14 | }; | ||
| 15 | |||
| 9 | #if defined(CONFIG_OF) | 16 | #if defined(CONFIG_OF) |
| 10 | extern struct regulator_init_data | 17 | extern struct regulator_init_data |
| 11 | *of_get_regulator_init_data(struct device *dev, | 18 | *of_get_regulator_init_data(struct device *dev, |
| 12 | struct device_node *node); | 19 | struct device_node *node); |
| 20 | extern int of_regulator_match(struct device *dev, struct device_node *node, | ||
| 21 | struct of_regulator_match *matches, | ||
| 22 | unsigned int num_matches); | ||
| 13 | #else | 23 | #else |
| 14 | static inline struct regulator_init_data | 24 | static inline struct regulator_init_data |
| 15 | *of_get_regulator_init_data(struct device *dev, | 25 | *of_get_regulator_init_data(struct device *dev, |
| @@ -17,6 +27,14 @@ static inline struct regulator_init_data | |||
| 17 | { | 27 | { |
| 18 | return NULL; | 28 | return NULL; |
| 19 | } | 29 | } |
| 30 | |||
| 31 | static inline int of_regulator_match(struct device *dev, | ||
| 32 | struct device_node *node, | ||
| 33 | struct of_regulator_match *matches, | ||
| 34 | unsigned int num_matches) | ||
| 35 | { | ||
| 36 | return 0; | ||
| 37 | } | ||
| 20 | #endif /* CONFIG_OF */ | 38 | #endif /* CONFIG_OF */ |
| 21 | 39 | ||
| 22 | #endif /* __LINUX_OF_REG_H */ | 40 | #endif /* __LINUX_OF_REG_H */ |
