On 7/25/22 22:36, Andy Shevchenko wrote:
On Sun, Jul 24, 2022 at 7:21 PM Marek Vasut <marex@xxxxxxx> wrote:
Always configure GPIO pins which are used as interrupt source as INPUTs.
In case the default pin configuration is OUTPUT, or the prior stage does
configure the pins as OUTPUT, then Linux will not reconfigure the pin as
INPUT and no interrupts are received.
Always configure interrupt source GPIO pin as input to fix the above case.
the interrupt
...
I'm wondering if it's configured as output (by who?) shouldn't you
issue a warning?
Probably not, I can think of valid use-case where the pin can be
configured as output by the prior stage e.g. to operate an LED, but then
reconfigured as input by Linux to e.g. sample a button. There is
hardware which shares button and LED on the same GPIO line to my knowledge.