Re: [PATCH v3 2/2] gpio: mxc: Always set GPIOs used as interrupt source to INPUT mode

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

 



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.



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux