mirror_ubuntu-kernels/include/linux/regulator
Markus Pargmann 76f439df50 regulator: Add ena_gpio_initialized to regulator_config
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>
2014-10-20 12:23:45 +01:00
..
ab8500.h
act8865.h regulator: act8865: add support for act8846 2014-08-05 18:02:53 +01:00
consumer.h regulator: core: Add REGULATOR_EVENT_PRE_VOLTAGE_CHANGE (and ABORT) 2014-08-29 11:58:31 +01:00
da9211.h regulator: da9211: support device tree 2014-08-27 10:27:56 +01:00
db8500-prcmu.h
driver.h regulator: Add ena_gpio_initialized to regulator_config 2014-10-20 12:23:45 +01:00
fan53555.h
fixed.h
gpio-regulator.h
lp872x.h
lp3971.h
lp3972.h
machine.h regulator: fix kernel-doc warnings in header files 2014-08-28 09:59:42 +01:00
max1586.h regulator: max1586: add device-tree support 2014-09-01 11:35:45 +01:00
max8649.h
max8660.h
max8952.h
max8973-regulator.h
of_regulator.h
pfuze100.h
tps6507x.h
tps51632-regulator.h
tps62360.h
userspace-consumer.h