I'm porting and existing system that used level triggered interrupts to an embedded Linux device. I'm having a bit of trouble and hopefully someone can help. My plan was to use the poll() function (in user space, no plan for a low level driver) to detect when the gpio line is high. That's the indication to do something.
Unfortunately I haven't figured out how to enable that condition. Right now I'm doing the following:
- Write the gpio number to /sys/class/gpio/export
- Set the direction to "in"
- Set the edge to ?
Can I setup the GPIO such that poll will return whenever the gpio line is high, even if poll() is called multiple times without clearing the condition, but it will wait if the line is low? Should I be using something else instead of trying to use poll()? Thanks!
P.S. Is it possible I'm running into a hardware configuration problem? How does the Linux code for the DM37x handle interrupts on the GPIO lines, specifically level triggered ones?