Re: GPIO subsystem and interrupts -- no way to do rising & falling edge on same pin?
Manuel Bouyer <[email protected]> Tue, 15 May 2018 13:14:51 +0200
| Newsgroups | gmane.os.netbsd.devel.embedded |
|---|---|
| Message-ID | <[email protected]> |
On Wed, May 02, 2018 at 07:28:21PM -0700, Jason Thorpe wrote: > I?m 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?s 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?re nearly out of bits ? there?s just one left, and so I?m hesitant to burn it to indicate both, especially since there are other capabilities that would be nice to expose (such as the Broadcom SoC?s non-sampled mode, although I don?t really need it immediately, myself). So it looks like we'll run out of bits soon anyway. What about expanding the interface and add the needed compat code (COMPAT_80) ? -- Manuel Bouyer <[email protected]> NetBSD: 26 ans d'experience feront toujours la difference --