I’m trying to use edge-detection using the gpio character device interface.
gpiomon (from package gpiod) illustrates the problem best:
marc:libbgpiod-0.3.1$ gpiomon -r 1 81
^C
marc:libbgpiod-0.3.1$ gpiomon -r 1 81
gpiomon: error waiting for events: No such device
marc:libbgpiod-0.3.1$ gpiomon -r 1 82
^C
marc:libbgpiod-0.3.1$ gpiomon -r 1 82
gpiomon: error waiting for events: No such device
As you see, the first time I use a line it appears to work. Subsequently it does not. Rebooting allows it to work (one time only) again.
It looks like is a kernel problem. I don’t think its a libgpiod problem as I have the same problem when using a custom library.
Does anyone have any ideas? Who should I talk to? Who owns this issue? Should I talk to librecomputer, raspbian or the kernel developers?
I’m using raspbian bookwork, with the following kernel:
Linux lab 6.1.68-12200-g1c40dda3081e #1 SMP PREEMPT_DYNAMIC Thu Dec 14 04:02:49 EST 2023 aarch64 GNU/Linux
I updated the kernel today. It was the same under the previous kernel.
Hmmm. That certainly looks like it’s related. The weird thing though is not that it doesn’t work, but rather that it works once. That makes me think that something is being allocated by the kernel in the first usage and then not properly released when the process shuts down.
I am not sure how to proceed with this but for now I think I’m going to switch to a Rpi to finish development and hope to switch back to the Potato later. Anyone know if the Sweet Potato has this issue?
We own the issue. The GXL (S805X/S905X/S905D) family and the G12 (A311D) have interrupt controllers that do not support dual edged triggers. There is also a limit on the number of interrupts that can be set. We emulate dual edge triggers by toggling the trigger edge after each interrupt. We are looking into this issue and will get back to you.
We have added dual edge emulation to our linux-6.12.y-lc branch. It will get pushed out with new images around July but you can build it now if you would like.