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 05/02/2018 10:28 PM, 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).
> 
> Discuss.

  Would it be practical to use that last bit to indicate a "spillover"
condition into another word to gain additional bits?

             -Dave

-- 
Dave McGuire, AK4HZ
New Kensington, PA


Home | Main Index | Thread Index | Old Index