summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBengt Jonsson <bengt.g.jonsson@stericsson.com>2011-10-04 11:40:10 +0200
committerYvan FILLION <yvan.fillion@stericsson.com>2011-10-11 15:34:00 +0200
commit8ab181e4be7eee7c88b1ed84f7d50b76bb7aed36 (patch)
treeccdbde89dac6c30d6db4327632bf45011cdd5618 /include
parent70bb59cdc42f53f02acd9f7fcdeb111729257b17 (diff)
regulators: ab8500: Add support of low voltage battery
Low voltage batteries have a wider voltage range with lower operating voltages. Some consumers in the platform may not work with the lower voltages and therefore need an extra regulator to boost the voltage in this case. This driver adds support for checking the consumers that need higher voltage (Vaux1, 2 and 3 regulators, 3 V SIM) and control the external buck/boost regulator accordingly. Note that to utilize the low voltage battery support, the battery voltage thresholds must be changed. This applies for the low battery voltage threshold of the battery manager and the OTP setting for the AB8500 BattOk levels. ST-Ericsson ID: 282517, 363432 ST-Ericsson Linux next: - ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ife07a622ec9748c027dbbd78b01e4ee7e92629ec Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33616 Reviewed-by: QABUILD
Diffstat (limited to 'include')
-rw-r--r--include/linux/regulator/ab8500.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h
index 095d94af589..df1e148da73 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,
@@ -86,11 +88,27 @@ enum ab8500_regulator_reg {
AB8500_NUM_REGULATOR_REGISTERS,
};
+/* AB8500 external regulators */
+enum ab8500_ext_regulator_id {
+ AB8500_EXT_SUPPLY3,
+ AB8500_NUM_EXT_REGULATORS,
+};
+
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;
};
+#ifdef CONFIG_REGULATOR_AB8500_EXT
+__devinit int ab8500_ext_regulator_init(struct platform_device *pdev);
+__devexit int ab8500_ext_regulator_exit(struct platform_device *pdev);
+#else
+inline __devinit int ab8500_ext_regulator_init(struct platform_device *pdev) {}
+inline __devexit int ab8500_ext_regulator_exit(struct platform_device *pdev) {}
+#endif
+
#endif