This patch adds a simple driver for chargers indicating their online status
through a GPIO pin.
Signed-off-by: Lars-Peter Clausen<lars@xxxxxxxxxx>
---
drivers/power/Kconfig | 10 ++
drivers/power/Makefile | 1 +
drivers/power/gpio-charger.c | 184 ++++++++++++++++++++++++++++++++++++
include/linux/power/gpio-charger.h | 39 ++++++++
4 files changed, 234 insertions(+), 0 deletions(-)
create mode 100644 drivers/power/gpio-charger.c
create mode 100644 include/linux/power/gpio-charger.h
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 0734356..90b1940 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -166,4 +166,14 @@ config BATTERY_INTEL_MID
Say Y here to enable the battery driver on Intel MID
platforms.
+config CHARGER_GPIO
+ tristate "GPIO charger"
+ depends on GPIOLIB
+ help
+ Say Y to include support for chargers which report their online status
+ through a GPIO pin.
+
+ This driver can be build as a module. If so, the module will be
+ called gpio-chager.