forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/Documentation/driver-api/gpio/drivers-on-gpio.rst
....@@ -89,13 +89,20 @@
8989 Consumer Electronics Control bus using only GPIO. It is used to communicate
9090 with devices on the HDMI bus.
9191
92
+- gpio-charger: drivers/power/supply/gpio-charger.c is used if you need to do
93
+ battery charging and all you have to go by to check the presence of the
94
+ AC charger or more complex tasks such as indicating charging status using
95
+ nothing but GPIO lines, this driver provides that and also a clearly defined
96
+ way to pass the charging parameters from hardware descriptions such as the
97
+ device tree.
98
+
9299 Apart from this there are special GPIO drivers in subsystems like MMC/SD to
93100 read card detect and write protect GPIO lines, and in the TTY serial subsystem
94101 to emulate MCTRL (modem control) signals CTS/RTS by using two GPIO lines. The
95102 MTD NOR flash has add-ons for extra GPIO lines too, though the address bus is
96103 usually connected directly to the flash.
97104
98
-Use those instead of talking directly to the GPIOs using sysfs; they integrate
99
-with kernel frameworks better than your userspace code could. Needless to say,
100
-just using the appropriate kernel drivers will simplify and speed up your
101
-embedded hacking in particular by providing ready-made components.
105
+Use those instead of talking directly to the GPIOs from userspace; they
106
+integrate with kernel frameworks better than your userspace code could.
107
+Needless to say, just using the appropriate kernel drivers will simplify and
108
+speed up your embedded hacking in particular by providing ready-made components.