diff options
| author | Paul Kocialkowski <contact@paulk.fr> | 2016-02-05 13:42:19 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2016-02-05 13:57:09 -0500 |
| commit | 7e6213f4345c3798b7fb7af41d221e2fd77ec6a6 (patch) | |
| tree | db5025cf16488f9b37c8b67785c991ce64185302 /include/linux/regulator | |
| parent | 690f44badf2f44b8ec09098118b74f789f95e2c8 (diff) | |
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')
| -rw-r--r-- | include/linux/regulator/lp872x.h | 5 |
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 @@ | |||
| 18 | 18 | ||
| 19 | #define LP872X_MAX_REGULATORS 9 | 19 | #define LP872X_MAX_REGULATORS 9 |
| 20 | 20 | ||
| 21 | #define LP8720_ENABLE_DELAY 200 | ||
| 22 | #define LP8725_ENABLE_DELAY 30000 | ||
| 23 | |||
| 21 | enum lp872x_regulator_id { | 24 | enum lp872x_regulator_id { |
| 22 | LP8720_ID_BASE, | 25 | LP8720_ID_BASE, |
| 23 | LP8720_ID_LDO1 = LP8720_ID_BASE, | 26 | LP8720_ID_LDO1 = LP8720_ID_BASE, |
| @@ -79,12 +82,14 @@ struct lp872x_regulator_data { | |||
| 79 | * @update_config : if LP872X_GENERAL_CFG register is updated, set true | 82 | * @update_config : if LP872X_GENERAL_CFG register is updated, set true |
| 80 | * @regulator_data : platform regulator id and init data | 83 | * @regulator_data : platform regulator id and init data |
| 81 | * @dvs : dvs data for buck voltage control | 84 | * @dvs : dvs data for buck voltage control |
| 85 | * @enable_gpio : gpio pin number for enable control | ||
| 82 | */ | 86 | */ |
| 83 | struct lp872x_platform_data { | 87 | struct lp872x_platform_data { |
| 84 | u8 general_config; | 88 | u8 general_config; |
| 85 | bool update_config; | 89 | bool update_config; |
| 86 | struct lp872x_regulator_data regulator_data[LP872X_MAX_REGULATORS]; | 90 | struct lp872x_regulator_data regulator_data[LP872X_MAX_REGULATORS]; |
| 87 | struct lp872x_dvs *dvs; | 91 | struct lp872x_dvs *dvs; |
| 92 | int enable_gpio; | ||
| 88 | }; | 93 | }; |
| 89 | 94 | ||
| 90 | #endif | 95 | #endif |
