]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpio: sysfs: allow disabling the legacy parts of the GPIO sysfs interface
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 4 Jul 2025 12:58:56 +0000 (14:58 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 16 Jul 2025 08:27:08 +0000 (10:27 +0200)
commite69c6db4cdbc149ff090f1449a114c33ba766dc8
tree1fbbe60af2170dd56ca3e2022eec80597f273d90
parent4fa93223e03eea3243db83786f556b6c1494de3e
gpio: sysfs: allow disabling the legacy parts of the GPIO sysfs interface

Add a Kconfig switch allowing to disable the legacy parts of the GPIO
sysfs interface. This means that even though we keep the
/sys/class/gpio/ directory, it no longer contains the global
export/unexport attribute pair (instead, the user should use the
per-chip export/unpexport) nor the gpiochip$BASE entries. This option
default to y if GPIO sysfs is enabled but we'll default it to n at some
point in the future.

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