diff options
| author | Laxman Dewangan <ldewangan@nvidia.com> | 2015-04-23 06:40:24 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2015-05-22 08:47:33 -0400 |
| commit | 69eb0980ab4ced06f7c2b4774575337ce32912fb (patch) | |
| tree | 3aeacd3144999f69e9bd679829f21a0f29abe301 /include/linux/regulator | |
| parent | c2ffa9737878ad9843d1e0e904dc9a086438aff8 (diff) | |
regulator: max8973: add mechanism to enable/disable through GPIO
MAX8973 supports the voltage output enable/disable through its EN
pin. This EN pin can be connected through GPIO from host processor.
Add support to provide GPIO number from platform/DT and if it is
valid GPIO then enable external control default.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator')
| -rw-r--r-- | include/linux/regulator/max8973-regulator.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/regulator/max8973-regulator.h b/include/linux/regulator/max8973-regulator.h index f8acc052e353..f6a8a16a0d4d 100644 --- a/include/linux/regulator/max8973-regulator.h +++ b/include/linux/regulator/max8973-regulator.h | |||
| @@ -58,6 +58,9 @@ | |||
| 58 | * control signal from EN input pin. If it is false then | 58 | * control signal from EN input pin. If it is false then |
| 59 | * voltage output will be enabled/disabled through EN bit of | 59 | * voltage output will be enabled/disabled through EN bit of |
| 60 | * device register. | 60 | * device register. |
| 61 | * @enable_gpio: Enable GPIO. If EN pin is controlled through GPIO from host | ||
| 62 | * then GPIO number can be provided. If no GPIO controlled then | ||
| 63 | * it should be -1. | ||
| 61 | * @dvs_gpio: GPIO for dvs. It should be -1 if this is tied with fixed logic. | 64 | * @dvs_gpio: GPIO for dvs. It should be -1 if this is tied with fixed logic. |
| 62 | * @dvs_def_state: Default state of dvs. 1 if it is high else 0. | 65 | * @dvs_def_state: Default state of dvs. 1 if it is high else 0. |
| 63 | */ | 66 | */ |
| @@ -65,6 +68,7 @@ struct max8973_regulator_platform_data { | |||
| 65 | struct regulator_init_data *reg_init_data; | 68 | struct regulator_init_data *reg_init_data; |
| 66 | unsigned long control_flags; | 69 | unsigned long control_flags; |
| 67 | bool enable_ext_control; | 70 | bool enable_ext_control; |
| 71 | int enable_gpio; | ||
| 68 | int dvs_gpio; | 72 | int dvs_gpio; |
| 69 | unsigned dvs_def_state:1; | 73 | unsigned dvs_def_state:1; |
| 70 | }; | 74 | }; |
