tech-embed archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GPIO subsystem and interrupts -- no way to do rising & falling edge on same pin?




> On May 15, 2018, at 7:14 AM, Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:
> 
> 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) ?

I’ve done this — I’m going to be posting some more on this as soon as I’ve tested it (and had Brad Spencer verify that the PPS driver he submitted still works correctly with the new way).

> 
> -- 
> Manuel Bouyer <bouyer%antioche.eu.org@localhost>
>     NetBSD: 26 ans d'experience feront toujours la difference
> --

-- thorpej



Home | Main Index | Thread Index | Old Index