So we have a program that reads from GPIO. On our desktop, we create a little fake GPIO file that we write 0 or 1 into. We use inotify (because libevent doesn't work with regular files) to signal when this file changes. So far so good. On the gumstix, we find that inotify is never signaled when the /sys/class/gpio/gpio23/value file changes. What's strange is that if we do an echo 1 > value, inotify is then signaled and whatever value is actually present in the file is then read.
In short, the kernel (or filesystem, whatever) is not "signaling" properly that the GPIO file has changed.
and it talks about poll(2) and setting the edge value. I currently have "edge" set to "both", still doesn't help.
- Has anyone used inotify successfully with GPIO? Is there some config we need to use?
- Or should we scrap inotify and just use regular old poll / select?
Any thoughts are welcome. Thanks!