Am Montag, dem 22.12.2025 um 22:52 +0000 schrieb andy pugh: > The new API for libgpiod is a lot more limited than the old one. It > used to be possible to find a GPIO line by name, and it also used to > be possible to iterate through gpiochips by number. > > Now the only way seems to be to iterate through the chips then > iterate > through the lines for each chip, comparing to the name list in the > module parameter. > > This is a one-time chore, so is do-able except that the _only_ way to > pen a gpio chip now is by path, eg /dev/gpiochip0 > > So how to get a list of all /dev/gpiochip* entries, in C, and > (preferably) in a kernel-mode compatible code. (to potentially hang > on > to RTAI a little longer) >
one thing is implementing a character device in linux kernel space, a completely different thing is using one. it is certainly possible somehow, but that code will bare no resemblance to userspace-code. maybe this https://www.kernel.org/doc/Documentation/gpio/drivers-on-gpio.txt could provide hints on how to do kernel modules using GPIOs, but you definitely don't want to search files in /dev or otherwise deal with files ioctls etc... from within kernel space. also it wouldn't help because you can't use libgpio in a kernel module anyways. regards -- Robert Schöftner <[email protected]> _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
