mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
76f439df50
Most drivers do not set the ena_gpio field of struct regulator_config before passing it to the regulator core. This is fine as long as the gpio identifier that is passed is a positive integer. But the gpio identifier 0 is also valid. So we are not able to decide wether we got a real gpio identifier or not based on a 0 in ena_gpio. To be able to decide if it is a valid gpio that got passed, this patch adds a ena_gpio_initialized field that should be set if was initialized with a correct value, either a gpio >= 0 or a negative error number. The core then checks if ena_gpio or ena_gpio_initialized before handling it as a gpio. This way we maintain backwards compatibility and fix the behaviour for gpio number 0. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org> |
||
---|---|---|
.. | ||
ab8500.h | ||
act8865.h | ||
consumer.h | ||
da9211.h | ||
db8500-prcmu.h | ||
driver.h | ||
fan53555.h | ||
fixed.h | ||
gpio-regulator.h | ||
lp872x.h | ||
lp3971.h | ||
lp3972.h | ||
machine.h | ||
max1586.h | ||
max8649.h | ||
max8660.h | ||
max8952.h | ||
max8973-regulator.h | ||
of_regulator.h | ||
pfuze100.h | ||
tps6507x.h | ||
tps51632-regulator.h | ||
tps62360.h | ||
userspace-consumer.h |