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

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

 



Hi Marc,

On Tue, Nov 23, 2021 at 9:33 AM Marc Zyngier <maz@xxxxxxxxxx> wrote:
> On Tue, 23 Nov 2021 07:57:48 +0000,
> Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx

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



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux