Skip to content

Commit 0c6dcc4

Browse files
author
Bartosz Golaszewski
committed
gpio: TODO: remove the item about the new debugfs interface
The consensus among core GPIO stakeholders seems to be that a new debugfs interface will only increase maintenance burden and will fail to attract users that care about long-term stability of the ABI[1]. Let's not go this way and not add a fourth user-facing interface to the GPIO subsystem. [1] https://lore.kernel.org/all/[email protected]/ Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 2eb5dc9 commit 0c6dcc4

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

drivers/gpio/TODO

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -156,42 +156,6 @@ multiplexing, pin configuration, GPIO, etc selectable options in one
156156
and the same pin control and GPIO subsystem.
157157

158158

159-
Debugfs in place of sysfs
160-
161-
The old sysfs code that enables simple uses of GPIOs from the
162-
command line is still popular despite the existance of the proper
163-
character device. The reason is that it is simple to use on
164-
root filesystems where you only have a minimal set of tools such
165-
as "cat", "echo" etc.
166-
167-
The old sysfs still need to be strongly deprecated and removed
168-
as it relies on the global GPIO numberspace that assume a strict
169-
order of global GPIO numbers that do not change between boots
170-
and is independent of probe order.
171-
172-
To solve this and provide an ABI that people can use for hacks
173-
and development, implement a debugfs interface to manipulate
174-
GPIO lines that can do everything that sysfs can do today: one
175-
directory per gpiochip and one file entry per line:
176-
177-
/sys/kernel/debug/gpiochip/gpiochip0
178-
/sys/kernel/debug/gpiochip/gpiochip0/gpio0
179-
/sys/kernel/debug/gpiochip/gpiochip0/gpio1
180-
/sys/kernel/debug/gpiochip/gpiochip0/gpio2
181-
/sys/kernel/debug/gpiochip/gpiochip0/gpio3
182-
...
183-
/sys/kernel/debug/gpiochip/gpiochip1
184-
/sys/kernel/debug/gpiochip/gpiochip1/gpio0
185-
/sys/kernel/debug/gpiochip/gpiochip1/gpio1
186-
...
187-
188-
The exact files and design of the debugfs interface can be
189-
discussed but the idea is to provide a low-level access point
190-
for debugging and hacking and to expose all lines without the
191-
need of any exporting. Also provide ample ammunition to shoot
192-
oneself in the foot, because this is debugfs after all.
193-
194-
195159
Moving over to immutable irq_chip structures
196160

197161
Most of the gpio chips implementing interrupt support rely on gpiolib

0 commit comments

Comments
 (0)