regulator: core: Limit propagation of parent voltage count and list
Commit26988efe11
("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:26988efe11
("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>
This commit is contained in:

committed by
Mark Brown

parent
fffd113338
commit
fd08604555
@@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user