Documentation: gpio: update sysfs documentation to reference new chardev doc

Update GPIO sysfs interface documentation to reference the new
chardev document rather than gpio.h.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
Kent Gibson 2024-01-15 08:48:43 +08:00 committed by Bartosz Golaszewski
parent 5054626a9b
commit e10b641753
1 changed files with 15 additions and 12 deletions

View File

@ -2,18 +2,18 @@ GPIO Sysfs Interface for Userspace
================================== ==================================
.. warning:: .. warning::
This API is obsoleted by the chardev.rst and the ABI documentation has
been moved to Documentation/ABI/obsolete/sysfs-gpio.
THIS ABI IS DEPRECATED, THE ABI DOCUMENTATION HAS BEEN MOVED TO New developments should use the chardev.rst, and existing developments are
Documentation/ABI/obsolete/sysfs-gpio AND NEW USERSPACE CONSUMERS encouraged to migrate as soon as possible, as this API will be removed
ARE SUPPOSED TO USE THE CHARACTER DEVICE ABI. THIS OLD SYSFS ABI WILL in the future.
NOT BE DEVELOPED (NO NEW FEATURES), IT WILL JUST BE MAINTAINED.
Refer to the examples in tools/gpio/* for an introduction to the new This interface will continue to be maintained for the migration period,
character device ABI. Also see the userspace header in but new features will only be added to the new API.
include/uapi/linux/gpio.h
The deprecated sysfs ABI The obsolete sysfs ABI
------------------------ ----------------------
Platforms which use the "gpiolib" implementors framework may choose to Platforms which use the "gpiolib" implementors framework may choose to
configure a sysfs user interface to GPIOs. This is different from the configure a sysfs user interface to GPIOs. This is different from the
debugfs interface, since it provides control over GPIO direction and debugfs interface, since it provides control over GPIO direction and
@ -33,9 +33,12 @@ userspace GPIO can be used to determine system configuration data that
standard kernels won't know about. And for some tasks, simple userspace standard kernels won't know about. And for some tasks, simple userspace
GPIO drivers could be all that the system really needs. GPIO drivers could be all that the system really needs.
DO NOT ABUSE SYSFS TO CONTROL HARDWARE THAT HAS PROPER KERNEL DRIVERS. .. note::
PLEASE READ THE DOCUMENT AT Documentation/driver-api/gpio/drivers-on-gpio.rst Do NOT abuse sysfs to control hardware that has proper kernel drivers.
TO AVOID REINVENTING KERNEL WHEELS IN USERSPACE. I MEAN IT. REALLY. Please read Documentation/driver-api/gpio/drivers-on-gpio.rst
to avoid reinventing kernel wheels in userspace.
I MEAN IT. REALLY.
Paths in Sysfs Paths in Sysfs
-------------- --------------