summaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-03-28 16:11:01 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-29 17:49:07 +0000
commitd1a820011b2fbc11d5af80d1a961fe66c613fa4b (patch)
treea651cd0d73b9a2b94385c83463a57964a4a7ca62 /include/linux/regulator
parentcc40dc2981396748ebcdde4a313d65ba26b0159d (diff)
downloadlinux-stable-d1a820011b2fbc11d5af80d1a961fe66c613fa4b.tar.gz
linux-stable-d1a820011b2fbc11d5af80d1a961fe66c613fa4b.tar.bz2
linux-stable-d1a820011b2fbc11d5af80d1a961fe66c613fa4b.zip
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 @@
#ifndef __LINUX_MFD_AB8500_REGULATOR_H
#define __LINUX_MFD_AB8500_REGULATOR_H
+#include <linux/platform_device.h>
+
/* AB8500 regulators */
enum ab8500_regulator_id {
AB8500_LDO_AUX1,
@@ -140,11 +142,37 @@ enum ab9540_regulator_reg {
AB9540_NUM_REGULATOR_REGISTERS,
};
+/* AB8500 external regulators */
+enum ab8500_ext_regulator_id {
+ AB8500_EXT_SUPPLY1,
+ AB8500_EXT_SUPPLY2,
+ AB8500_EXT_SUPPLY3,
+ AB8500_NUM_EXT_REGULATORS,
+};
+
+/* AB8500 regulator platform data */
struct ab8500_regulator_platform_data {
int num_reg_init;
struct ab8500_regulator_reg_init *reg_init;
int num_regulator;
struct regulator_init_data *regulator;
+ int num_ext_regulator;
+ struct regulator_init_data *ext_regulator;
};
+/* AB8500 external regulator functions (internal) */
+#ifdef CONFIG_REGULATOR_AB8500_EXT
+int ab8500_ext_regulator_init(struct platform_device *pdev);
+int ab8500_ext_regulator_exit(struct platform_device *pdev);
+#else
+inline int ab8500_ext_regulator_init(struct platform_device *pdev)
+{
+ return 0;
+}
+inline int ab8500_ext_regulator_exit(struct platform_device *pdev)
+{
+ return 0;
+}
+#endif
+
#endif