Skip to content

Commit af54a2f

Browse files
author
Bartosz Golaszewski
committed
gpio: TODO: add an item to track reworking the sysfs interface
It seems there really exists the need for a simple sysfs interface that can be easily used from minimal initramfs images that don't contain much more than busybox. However the current interface poses a challenge to the removal of global GPIO numberspace. Add an item that tracks extending the existing ABI with a per-chip export/unexport attribute pair. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250321-gpio-todo-updates-v1-6-7b38f07110ee@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent 9ff2443 commit af54a2f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/gpio/TODO

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,16 @@ value back to the caller.
173173
We've now added new variants - set_rv() and set_multiple_rv() that return an
174174
integer. Let's convert all GPIO drivers treewide to use the new callbacks,
175175
remove the old ones and finally rename the new ones back to the old names.
176+
177+
-------------------------------------------------------------------------------
178+
179+
Extend the sysfs ABI to allow exporting lines by their HW offsets
180+
181+
The need to support the sysfs GPIO class is one of the main obstacles to
182+
removing the global GPIO numberspace from the kernel. In order to wean users
183+
off using global numbers from user-space, extend the existing interface with
184+
new per-gpiochip export/unexport attributes that allow to refer to GPIOs using
185+
their hardware offsets within the chip.
186+
187+
Encourage users to switch to using them and eventually remove the existing
188+
global export/unexport attribues.

0 commit comments

Comments
 (0)