diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-12-26 21:18:55 +0100 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2017-01-04 22:04:50 +0100 |
commit | fb9a33ae6ba7eb6c22a2f37e4be7a96bf55da14d (patch) | |
tree | 8e57770001a8a08352d48c52beb0a12f5748f904 /drivers/power/supply/Kconfig | |
parent | c56ca24a01ee88e53d2ecf4c070653b6ef45968f (diff) |
power: supply: gpio_charger: switch to using GPIO descriptors
The GPIO charger is using a mix of the legacy GPIO interface
and <linux/of_gpio.h> which is not the modern way to use GPIOs.
Refactor like this:
- Use a GPIO descriptor for the GPIO line used to monitor the
charger.
- Fetch the descriptor with devm_gpiod_get() as the first
method.
- If this fails and we are *not* using device tree, then
start looking to see if we can use platform data instead.
- After looking up and requesting a GPIO number with the
legacy API, convert it to a descriptor.
This way we can later isolate and drop the legacy code as
more platforms move over to using descriptors.
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power/supply/Kconfig')
0 files changed, 0 insertions, 0 deletions