diff mbox series

gpio: Add gpio-charger to the documentation

Message ID 20200610095124.170079-1-linus.walleij@linaro.org
State Superseded
Headers show
Series gpio: Add gpio-charger to the documentation | expand

Commit Message

Linus Walleij June 10, 2020, 9:51 a.m. UTC
The GPIO-based charger is another of the helpful devices built
on top of GPIO.

Cc: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
 Documentation/driver-api/gpio/drivers-on-gpio.rst | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.25.4

Comments

Sebastian Reichel June 10, 2020, 2:01 p.m. UTC | #1
Hi Linus,

On Wed, Jun 10, 2020 at 11:51:24AM +0200, Linus Walleij wrote:
> The GPIO-based charger is another of the helpful devices built

> on top of GPIO.

> 

> Cc: Sebastian Reichel <sebastian.reichel@collabora.com>

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

>  Documentation/driver-api/gpio/drivers-on-gpio.rst | 7 +++++++

>  1 file changed, 7 insertions(+)

> 

> diff --git a/Documentation/driver-api/gpio/drivers-on-gpio.rst b/Documentation/driver-api/gpio/drivers-on-gpio.rst

> index 820b403d50f6..d85fb748cc52 100644

> --- a/Documentation/driver-api/gpio/drivers-on-gpio.rst

> +++ b/Documentation/driver-api/gpio/drivers-on-gpio.rst

> @@ -89,6 +89,13 @@ hardware descriptions such as device tree or ACPI:

>    Consumer Electronics Control bus using only GPIO. It is used to communicate

>    with devices on the HDMI bus.

>  

> +- gpio-charger: drivers/power/supply/gpio-charger.c is used if you need to do

> +  battery charging and all you have to go by to check the presence of the

> +  battery


The presence being checked and reported to userspace is for the AC
adapter, not the battery. Battery presence is handled by battery
driver (e.g. sbs-battery has a detect gpio).

> +          or more complex tasks such as indicating charging status using

> +  nothing but GPIO lines, this driver provides that and also a clearly defined

> +  way to pass the charging parameters from hardware descriptions such as the

> +  device tree.

> +

>  Apart from this there are special GPIO drivers in subsystems like MMC/SD to

>  read card detect and write protect GPIO lines, and in the TTY serial subsystem

>  to emulate MCTRL (modem control) signals CTS/RTS by using two GPIO lines. The


Otherwise LGTM.

-- Sebastian
diff mbox series

Patch

diff --git a/Documentation/driver-api/gpio/drivers-on-gpio.rst b/Documentation/driver-api/gpio/drivers-on-gpio.rst
index 820b403d50f6..d85fb748cc52 100644
--- a/Documentation/driver-api/gpio/drivers-on-gpio.rst
+++ b/Documentation/driver-api/gpio/drivers-on-gpio.rst
@@ -89,6 +89,13 @@  hardware descriptions such as device tree or ACPI:
   Consumer Electronics Control bus using only GPIO. It is used to communicate
   with devices on the HDMI bus.
 
+- gpio-charger: drivers/power/supply/gpio-charger.c is used if you need to do
+  battery charging and all you have to go by to check the presence of the
+  battery or more complex tasks such as indicating charging status using
+  nothing but GPIO lines, this driver provides that and also a clearly defined
+  way to pass the charging parameters from hardware descriptions such as the
+  device tree.
+
 Apart from this there are special GPIO drivers in subsystems like MMC/SD to
 read card detect and write protect GPIO lines, and in the TTY serial subsystem
 to emulate MCTRL (modem control) signals CTS/RTS by using two GPIO lines. The