power: supply: sbs-battery: Use gpio_desc and sleeping calls for battery detect
authorPhil Reid <preid@electromag.com.au>
Thu, 1 Sep 2016 07:50:52 +0000 (15:50 +0800)
committerSebastian Reichel <sre@kernel.org>
Thu, 1 Sep 2016 14:06:14 +0000 (16:06 +0200)
commit3b5dd3a49496220b35af83c96e3d2ff5716550ae
tree31b06b095bcfd1920da2759c1db89c3fe46f33d0
parent528e3504123d0281c613b83ca46aaf2dd7c3f45e
power: supply: sbs-battery: Use gpio_desc and sleeping calls for battery detect

Switch to using new gpio_desc interface and devm gpio get calls to
automatically manage gpio resource. Use gpiod_get_value which handles
active high / low calls.

If gpio_detect is set then force loading of the driver as it is
reasonable to assume that the battery may not be present.

Update the is_present flag immediately in the IRQ.

Remove legacy gpio specification from platform data.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/sbs-battery.c
include/linux/power/sbs-battery.h
This page took 0.026098 seconds and 5 git commands to generate.