diff options
author | Matthias Kaehlcke <mka@chromium.org> | 2017-03-27 16:54:12 -0700 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-03-29 12:49:38 +0100 |
commit | fd086045559d90cd7854818b4c60a7119eda6231 (patch) | |
tree | 395f225c6be480bcb7d0396608540a7225b5b454 /include | |
parent | fffd1133388857f5b4b8c588b41b2ade16c7891c (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')
-rw-r--r-- | include/linux/regulator/driver.h | 2 |
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; }; |