summaryrefslogtreecommitdiffstats
path: root/include/linux/regulator/driver.h
diff options
context:
space:
mode:
authorMatthias Kaehlcke <mka@chromium.org>2017-03-27 16:54:12 -0700
committerMark Brown <broonie@kernel.org>2017-03-29 12:49:38 +0100
commitfd086045559d90cd7854818b4c60a7119eda6231 (patch)
tree395f225c6be480bcb7d0396608540a7225b5b454 /include/linux/regulator/driver.h
parentfffd1133388857f5b4b8c588b41b2ade16c7891c (diff)
downloadlinux-fd086045559d90cd7854818b4c60a7119eda6231.tar.gz
linux-fd086045559d90cd7854818b4c60a7119eda6231.tar.bz2
linux-fd086045559d90cd7854818b4c60a7119eda6231.zip
regulator: core: Limit propagation of parent voltage count and list
Commit 26988efe11b1 ("regulator: core: Allow to get voltage count and list from parent") introduces the propagation of the parent voltage count and list for regulators that don't provide this information themselves. The goal is to support simple switch regulators, however as a side effect normal continuous regulators can leak details of their supplies and provide consumers with inconsistent information. Limit the propagation of the voltage count and list to switch regulators. Fixes: 26988efe11b1 ("regulator: core: Allow to get voltage count and list from parent") Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Tested-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator/driver.h')
-rw-r--r--include/linux/regulator/driver.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index dac8e7b16bc6..4cb1c9be6073 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -429,6 +429,8 @@ struct regulator_dev {
struct regulator_enable_gpio *ena_pin;
unsigned int ena_gpio_state:1;
+ unsigned int is_switch:1;
+
/* time when this regulator was disabled last time */
unsigned long last_off_jiffy;
};