summaryrefslogtreecommitdiff
path: root/include/linux/regulator/lp872x.h
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2016-02-05 21:42:19 +0300
committerMark Brown <broonie@kernel.org>2016-02-05 21:57:09 +0300
commit7e6213f4345c3798b7fb7af41d221e2fd77ec6a6 (patch)
treedb5025cf16488f9b37c8b67785c991ce64185302 /include/linux/regulator/lp872x.h
parent690f44badf2f44b8ec09098118b74f789f95e2c8 (diff)
downloadlinux-7e6213f4345c3798b7fb7af41d221e2fd77ec6a6.tar.xz
regulator: lp872x: Add enable GPIO pin support
LP872x regulators are made active via the EN pin, which might be hooked to a GPIO. This adds support for driving the GPIO high when the driver is in use. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator/lp872x.h')
-rw-r--r--include/linux/regulator/lp872x.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/regulator/lp872x.h b/include/linux/regulator/lp872x.h
index 132e05c46661..6029279f4eed 100644
--- a/include/linux/regulator/lp872x.h
+++ b/include/linux/regulator/lp872x.h
@@ -18,6 +18,9 @@
#define LP872X_MAX_REGULATORS 9
+#define LP8720_ENABLE_DELAY 200
+#define LP8725_ENABLE_DELAY 30000
+
enum lp872x_regulator_id {
LP8720_ID_BASE,
LP8720_ID_LDO1 = LP8720_ID_BASE,
@@ -79,12 +82,14 @@ struct lp872x_regulator_data {
* @update_config : if LP872X_GENERAL_CFG register is updated, set true
* @regulator_data : platform regulator id and init data
* @dvs : dvs data for buck voltage control
+ * @enable_gpio : gpio pin number for enable control
*/
struct lp872x_platform_data {
u8 general_config;
bool update_config;
struct lp872x_regulator_data regulator_data[LP872X_MAX_REGULATORS];
struct lp872x_dvs *dvs;
+ int enable_gpio;
};
#endif