[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdU5UAYONbT26e2Ttd7FmoXR8SxCO86bfLLmX9VDeQ2UVg@mail.gmail.com>
Date: Tue, 23 Nov 2021 12:02:29 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Marc Zyngier <maz@...nel.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
Android Kernel Team <kernel-team@...roid.com>,
Rob Herring <robh@...nel.org>, John Crispin <john@...ozen.org>,
Biwen Li <biwen.li@....com>,
Chris Brandt <chris.brandt@...esas.com>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>
Subject: Re: [PATCH] of/irq: Add a quirk for controllers with their own
definition of interrupt-map
Hi Marc,
On Tue, Nov 23, 2021 at 9:33 AM Marc Zyngier <maz@...nel.org> wrote:
> On Tue, 23 Nov 2021 07:57:48 +0000,
> Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> > 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@...ux-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
Powered by blists - more mailing lists