aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-03-28 12:11:01 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-29 13:49:07 -0400
commitd1a820011b2fbc11d5af80d1a961fe66c613fa4b (patch)
treea651cd0d73b9a2b94385c83463a57964a4a7ca62 /include/linux/regulator
parentcc40dc2981396748ebcdde4a313d65ba26b0159d (diff)
regulator: ab8500-ext: New driver to control external regulators
The ABx500 is capable of controlling three external regulator supplies. Most commonly on and off are supported, but if an external regulator chipset or power supply supports high-power and low-power mode settings, we can control those too. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/ab8500.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h
index 26792ff360be..4e92e5b879a5 100644
--- a/include/linux/regulator/ab8500.h
+++ b/include/linux/regulator/ab8500.h
@@ -10,6 +10,8 @@
10#ifndef __LINUX_MFD_AB8500_REGULATOR_H 10#ifndef __LINUX_MFD_AB8500_REGULATOR_H
11#define __LINUX_MFD_AB8500_REGULATOR_H 11#define __LINUX_MFD_AB8500_REGULATOR_H
12 12
13#include <linux/platform_device.h>
14
13/* AB8500 regulators */ 15/* AB8500 regulators */
14enum ab8500_regulator_id { 16enum ab8500_regulator_id {
15 AB8500_LDO_AUX1, 17 AB8500_LDO_AUX1,
@@ -140,11 +142,37 @@ enum ab9540_regulator_reg {
140 AB9540_NUM_REGULATOR_REGISTERS, 142 AB9540_NUM_REGULATOR_REGISTERS,
141}; 143};
142 144
145/* AB8500 external regulators */
146enum ab8500_ext_regulator_id {
147 AB8500_EXT_SUPPLY1,
148 AB8500_EXT_SUPPLY2,
149 AB8500_EXT_SUPPLY3,
150 AB8500_NUM_EXT_REGULATORS,
151};
152
153/* AB8500 regulator platform data */
143struct ab8500_regulator_platform_data { 154struct ab8500_regulator_platform_data {
144 int num_reg_init; 155 int num_reg_init;
145 struct ab8500_regulator_reg_init *reg_init; 156 struct ab8500_regulator_reg_init *reg_init;
146 int num_regulator; 157 int num_regulator;
147 struct regulator_init_data *regulator; 158 struct regulator_init_data *regulator;
159 int num_ext_regulator;
160 struct regulator_init_data *ext_regulator;
148}; 161};
149 162
163/* AB8500 external regulator functions (internal) */
164#ifdef CONFIG_REGULATOR_AB8500_EXT
165int ab8500_ext_regulator_init(struct platform_device *pdev);
166int ab8500_ext_regulator_exit(struct platform_device *pdev);
167#else
168inline int ab8500_ext_regulator_init(struct platform_device *pdev)
169{
170 return 0;
171}
172inline int ab8500_ext_regulator_exit(struct platform_device *pdev)
173{
174 return 0;
175}
176#endif
177
150#endif 178#endif