GPIO page needs an overhaul - character device interface

The GPIO page needs to be overhauled to account for the new ABI that's using character devices.
GPIO SYSFS has been marked obsolete in 2015 and I can't get it to work with the scripts provided on the wiki.

I just added an info box to the GPIO page in the wiki so other people won't waste their time like me ^^. https://openwrt.org/docs/techref/hardware/port.gpio#software

But someone more knowledgeable should take a look and overhaul the page, I guess.
I won't be the last person that's new to the project and is trying to add new LEDs to a dts, that were missing before. The current wiki page is/was frustrating because it didn't work at all.

Here's a great article on the topic:

2 Likes

apparently the stuff I described in the wiki and the stuff the article tells us and the current gpiodtools all rely on cdev in v1, which is broken with default kernel configs: https://zameermanji.com/blog/2022/1/18/ubuntu-21-10-makes-libgpiod-unusable/

libgpiod got it's release of v2 5months ago, so OpenWrt will probably have to update the gpiod-tools package soon and then it should be working again with a default kernel config :slight_smile:
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/NEWS

the API changed and gpiofind was dropped, for further information read the news above.

2 Likes