Hi Linus, On Fri, 28 Feb 2025 at 08:50, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: > On Wed, Feb 26, 2025 at 1:43 PM Marek Vasut <marex@xxxxxxx> wrote: > > > I understand, I'm fine with sysfs if it needs to be a "support forever" > > > ABI, as long as it's: > > > > > > - Using the per-chip HW numberspace > > > > This is no issue for me. So that would be 0..<N-1>, not <base>..<base+N-1>? Hence you cannot have global (un)export files in sysfs, but need per-chip (un)export files? > > > - Doesn't need any echo NN > export to see the lines in > > > sysfs. > > > > Can we really make do without export/unexport ? > > I was more thinking that we should not need export/unexport > just to see the line. Propsal elsewhere in this thread: > > /sys/bus/gpio/gpiochip0 > /sys/bus/gpio/gpiochip0/gpio0 > /sys/bus/gpio/gpiochip0/gpio0/userspace > /sys/bus/gpio/gpiochip0/gpio0/value > /sys/bus/gpio/gpiochip0/gpio1 > /sys/bus/gpio/gpiochip0/gpio1/userspace > /sys/bus/gpio/gpiochip0/gpio1/value > > Take a GPIO, shake it, give it back to the kernel: > echo 1 > /sys/bus/gpio/gpiochip0/gpio1/userspace > echo 0 > /sys/bus/gpio/gpiochip0/gpio1/value > sleep 1 > echo 1 > /sys/bus/gpio/gpiochip0/gpio1/value > echo 0 > /sys/bus/gpio/gpiochip0/gpio1/userspace > > So we can always "see" this GPIO line, instead of > exporting/unexporting there is a knob to assign/unassign > it to userspace. Why would you want to always "see" all GPIO lines? What is the use case for that? What am I missing? If it is recommended not to use this interface, I think all GPIOs should be invisible by default. Hence I still prefer the (un)export interface. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds