gpio: sysfs: export the GPIO directory locally in the gpiochip<id> directory
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 4 Jul 2025 12:58:55 +0000 (14:58 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 16 Jul 2025 08:27:08 +0000 (10:27 +0200)
commit4fa93223e03eea3243db83786f556b6c1494de3e
treeea856a2164e627f93ba414b999b9d115634f9283
parent1cd53df733c21ae0d344a2dec941a3e2a06fefd9
gpio: sysfs: export the GPIO directory locally in the gpiochip<id> directory

As a way to allow the user-space to stop referring to GPIOs by their
global numbers, introduce a parallel group of line attributes for
exported GPIO that live inside the GPIO chip class device and are
referred to by their HW offset within their parent chip.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20250704-gpio-sysfs-chip-export-v4-8-9289d8758243@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Documentation/ABI/obsolete/sysfs-gpio
drivers/gpio/gpiolib-sysfs.c