summaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2015-04-23 16:10:24 +0530
committerMark Brown <broonie@kernel.org>2015-05-22 13:47:33 +0100
commit69eb0980ab4ced06f7c2b4774575337ce32912fb (patch)
tree3aeacd3144999f69e9bd679829f21a0f29abe301 /include/linux/regulator
parentc2ffa9737878ad9843d1e0e904dc9a086438aff8 (diff)
downloadtalos-obmc-linux-69eb0980ab4ced06f7c2b4774575337ce32912fb.tar.gz
talos-obmc-linux-69eb0980ab4ced06f7c2b4774575337ce32912fb.zip
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.h4
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 @@
* control signal from EN input pin. If it is false then
* voltage output will be enabled/disabled through EN bit of
* device register.
+ * @enable_gpio: Enable GPIO. If EN pin is controlled through GPIO from host
+ * then GPIO number can be provided. If no GPIO controlled then
+ * it should be -1.
* @dvs_gpio: GPIO for dvs. It should be -1 if this is tied with fixed logic.
* @dvs_def_state: Default state of dvs. 1 if it is high else 0.
*/
@@ -65,6 +68,7 @@ struct max8973_regulator_platform_data {
struct regulator_init_data *reg_init_data;
unsigned long control_flags;
bool enable_ext_control;
+ int enable_gpio;
int dvs_gpio;
unsigned dvs_def_state:1;
};
OpenPOWER on IntegriCloud