diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-02-07 16:29:45 +0200 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-03-06 12:33:01 +0200 |
commit | d74e316633e49f44756c23997fa071979a939405 (patch) | |
tree | e0e465bb5ad25bfeee3dff9a51ef3d6e63735e0e /Documentation/driver-api | |
parent | 0e685c3e7158d35626d6d76b9f859eae806d87fa (diff) | |
download | lwn-d74e316633e49f44756c23997fa071979a939405.tar.gz lwn-d74e316633e49f44756c23997fa071979a939405.zip |
gpiolib: remove legacy gpio_export()
There are only a handful of users of gpio_export() and
related functions.
As these are just wrappers around the modern gpiod_export()
helper, remove the wrappers and open-code the gpio_to_desc
in all callers to shrink the legacy API.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'Documentation/driver-api')
-rw-r--r-- | Documentation/driver-api/gpio/legacy.rst | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/Documentation/driver-api/gpio/legacy.rst b/Documentation/driver-api/gpio/legacy.rst index e0306e78e34b..78372853c6d4 100644 --- a/Documentation/driver-api/gpio/legacy.rst +++ b/Documentation/driver-api/gpio/legacy.rst @@ -714,27 +714,6 @@ gpiochip nodes (possibly in conjunction with schematics) to determine the correct GPIO number to use for a given signal. -Exporting from Kernel code --------------------------- -Kernel code can explicitly manage exports of GPIOs which have already been -requested using gpio_request():: - - /* export the GPIO to userspace */ - int gpio_export(unsigned gpio, bool direction_may_change); - - /* reverse gpio_export() */ - void gpio_unexport(); - -After a kernel driver requests a GPIO, it may only be made available in -the sysfs interface by gpio_export(). The driver can control whether the -signal direction may change. This helps drivers prevent userspace code -from accidentally clobbering important system state. - -This explicit exporting can help with debugging (by making some kinds -of experiments easier), or can provide an always-there interface that's -suitable for documenting as part of a board support package. - - API Reference ============= |