GPIO subsystem and interrupts -- no way to do rising & falling edge on same pin?
Jason Thorpe <[email protected]> Wed, 02 May 2018 19:28:21 -0700
| Newsgroups | gmane.os.netbsd.devel.embedded |
|---|---|
| Message-ID | <[email protected]> |
I=E2=80=99m working on integrating the changes in kern/51676, but I seem = to have stumbled into a glaring deficiency into how the GPIO subsystem = supports interrupts. Specifically, it does not seem like there is a way to trigger an = interrupt on both the rising and falling edge of an event. This is = something that, for example, the Raspberry Pi=E2=80=99s SoC can do (and = something I have use for in my application). But alas, it seems as if = the presence of GPIO_PIN_FALLING indicates falling, and the lack of it = indicates rising. Unfortunately, we=E2=80=99re nearly out of bits =E2=80=A6 there=E2=80=99s = just one left, and so I=E2=80=99m hesitant to burn it to indicate both, = especially since there are other capabilities that would be nice to = expose (such as the Broadcom SoC=E2=80=99s non-sampled mode, although I = don=E2=80=99t really need it immediately, myself). Discuss. -- thorpej