Thread (29 messages) 29 messages, 6 authors, 2021-12-06

Re: [PATCH] of/irq: Add a quirk for controllers with their own definition of interrupt-map

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2021-11-23 11:02:52
Also in: linux-renesas-soc, lkml

Hi Marc,

On Tue, Nov 23, 2021 at 9:33 AM Marc Zyngier [off-list ref] wrote:
On Tue, 23 Nov 2021 07:57:48 +0000,
Geert Uytterhoeven [off-list ref] wrote:
quoted
Summarized:
  - Before the bad commit, and after your fix, irqc-rza1 is invoked,
    and the number of interrupts seen is correct, but input events
    are doubled.
  - After the bad commit, irqc-rza1 is not invoked, and there is an
    interrupt storm, but input events are OK.
OK, that's reassuring, even if the "twice the events" stuff isn't what
you'd expect. We at least know this is a separate issue, and that this
patch on top of -rc1 brings you back to the 5.15 behaviour.
So the "twice the events" stuff did happen before, and is caused by
gpio-keys always fabricating timer-based auto-"up" events when using
"interrupts" instead of "gpios".

arch/arm/boot/dts/r7s72100-rskrza1.dts has IRQ_TYPE_EDGE_BOTH to
detect the real "up", which becomes a second set of "down"/"up" events.
Using IRQ_TYPE_EDGE_FALLING gets rid of the dupe by only detecting
the real "down" event.  Similar for IRQ_TYPE_LEVEL_LOW, but then
there's a temporary interrupt storm until the key is released.

Seems like gpio-keys needs to be fixed for IRQ_TYPE_EDGE_BOTH.
When using "gpios" instead of "interrupts", it does pass
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, and handles that case
correctly.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help