aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorMatthias Kaehlcke <mka@chromium.org>2017-03-27 19:54:12 -0400
committerMark Brown <broonie@kernel.org>2017-03-29 07:49:38 -0400
commitfd086045559d90cd7854818b4c60a7119eda6231 (patch)
tree395f225c6be480bcb7d0396608540a7225b5b454 /include/linux/regulator
parentfffd1133388857f5b4b8c588b41b2ade16c7891c (diff)
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')
-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 {
429 struct regulator_enable_gpio *ena_pin; 429 struct regulator_enable_gpio *ena_pin;
430 unsigned int ena_gpio_state:1; 430 unsigned int ena_gpio_state:1;
431 431
432 unsigned int is_switch:1;
433
432 /* time when this regulator was disabled last time */ 434 /* time when this regulator was disabled last time */
433 unsigned long last_off_jiffy; 435 unsigned long last_off_jiffy;
434}; 436};