diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mfd/tps65910.h | 30 | ||||
-rw-r--r-- | include/linux/regulator/driver.h | 4 | ||||
-rw-r--r-- | include/linux/regulator/of_regulator.h | 20 |
3 files changed, 52 insertions, 2 deletions
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h index 8bf2cb9502dd..d0cb12eba402 100644 --- a/include/linux/mfd/tps65910.h +++ b/include/linux/mfd/tps65910.h | |||
@@ -740,6 +740,34 @@ | |||
740 | #define TPS65910_GPIO_STS BIT(1) | 740 | #define TPS65910_GPIO_STS BIT(1) |
741 | #define TPS65910_GPIO_SET BIT(0) | 741 | #define TPS65910_GPIO_SET BIT(0) |
742 | 742 | ||
743 | /* Regulator Index Definitions */ | ||
744 | #define TPS65910_REG_VRTC 0 | ||
745 | #define TPS65910_REG_VIO 1 | ||
746 | #define TPS65910_REG_VDD1 2 | ||
747 | #define TPS65910_REG_VDD2 3 | ||
748 | #define TPS65910_REG_VDD3 4 | ||
749 | #define TPS65910_REG_VDIG1 5 | ||
750 | #define TPS65910_REG_VDIG2 6 | ||
751 | #define TPS65910_REG_VPLL 7 | ||
752 | #define TPS65910_REG_VDAC 8 | ||
753 | #define TPS65910_REG_VAUX1 9 | ||
754 | #define TPS65910_REG_VAUX2 10 | ||
755 | #define TPS65910_REG_VAUX33 11 | ||
756 | #define TPS65910_REG_VMMC 12 | ||
757 | |||
758 | #define TPS65911_REG_VDDCTRL 4 | ||
759 | #define TPS65911_REG_LDO1 5 | ||
760 | #define TPS65911_REG_LDO2 6 | ||
761 | #define TPS65911_REG_LDO3 7 | ||
762 | #define TPS65911_REG_LDO4 8 | ||
763 | #define TPS65911_REG_LDO5 9 | ||
764 | #define TPS65911_REG_LDO6 10 | ||
765 | #define TPS65911_REG_LDO7 11 | ||
766 | #define TPS65911_REG_LDO8 12 | ||
767 | |||
768 | /* Max number of TPS65910/11 regulators */ | ||
769 | #define TPS65910_NUM_REGS 13 | ||
770 | |||
743 | /** | 771 | /** |
744 | * struct tps65910_board | 772 | * struct tps65910_board |
745 | * Board platform data may be used to initialize regulators. | 773 | * Board platform data may be used to initialize regulators. |
@@ -751,7 +779,7 @@ struct tps65910_board { | |||
751 | int irq_base; | 779 | int irq_base; |
752 | int vmbch_threshold; | 780 | int vmbch_threshold; |
753 | int vmbch2_threshold; | 781 | int vmbch2_threshold; |
754 | struct regulator_init_data *tps65910_pmic_init_data; | 782 | struct regulator_init_data *tps65910_pmic_init_data[TPS65910_NUM_REGS]; |
755 | }; | 783 | }; |
756 | 784 | ||
757 | /** | 785 | /** |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 52c89ae32f64..4214b9a9d1c9 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -154,6 +154,7 @@ enum regulator_type { | |||
154 | * this type. | 154 | * this type. |
155 | * | 155 | * |
156 | * @name: Identifying name for the regulator. | 156 | * @name: Identifying name for the regulator. |
157 | * @supply_name: Identifying the regulator supply | ||
157 | * @id: Numerical identifier for the regulator. | 158 | * @id: Numerical identifier for the regulator. |
158 | * @n_voltages: Number of selectors available for ops.list_voltage(). | 159 | * @n_voltages: Number of selectors available for ops.list_voltage(). |
159 | * @ops: Regulator operations table. | 160 | * @ops: Regulator operations table. |
@@ -163,6 +164,7 @@ enum regulator_type { | |||
163 | */ | 164 | */ |
164 | struct regulator_desc { | 165 | struct regulator_desc { |
165 | const char *name; | 166 | const char *name; |
167 | const char *supply_name; | ||
166 | int id; | 168 | int id; |
167 | unsigned n_voltages; | 169 | unsigned n_voltages; |
168 | struct regulator_ops *ops; | 170 | struct regulator_ops *ops; |
@@ -212,7 +214,7 @@ struct regulator_dev { | |||
212 | 214 | ||
213 | struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, | 215 | struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, |
214 | struct device *dev, const struct regulator_init_data *init_data, | 216 | struct device *dev, const struct regulator_init_data *init_data, |
215 | void *driver_data); | 217 | void *driver_data, struct device_node *of_node); |
216 | void regulator_unregister(struct regulator_dev *rdev); | 218 | void regulator_unregister(struct regulator_dev *rdev); |
217 | 219 | ||
218 | int regulator_notifier_call_chain(struct regulator_dev *rdev, | 220 | int regulator_notifier_call_chain(struct regulator_dev *rdev, |
diff --git a/include/linux/regulator/of_regulator.h b/include/linux/regulator/of_regulator.h new file mode 100644 index 000000000000..d83a98d3e3fd --- /dev/null +++ b/include/linux/regulator/of_regulator.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * OpenFirmware regulator support routines | ||
3 | * | ||
4 | */ | ||
5 | |||
6 | #ifndef __LINUX_OF_REG_H | ||
7 | #define __LINUX_OF_REG_H | ||
8 | |||
9 | #if defined(CONFIG_OF) | ||
10 | extern struct regulator_init_data | ||
11 | *of_get_regulator_init_data(struct device *dev); | ||
12 | #else | ||
13 | static inline struct regulator_init_data | ||
14 | *of_get_regulator_init_data(struct device *dev) | ||
15 | { | ||
16 | return NULL; | ||
17 | } | ||
18 | #endif /* CONFIG_OF */ | ||
19 | |||
20 | #endif /* __LINUX_OF_REG_H */ | ||