devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Marc Zyngier <maz@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	Android Kernel Team <kernel-team@android.com>,
	Rob Herring <robh@kernel.org>, John Crispin <john@phrozen.org>,
	Biwen Li <biwen.li@nxp.com>,
	Chris Brandt <chris.brandt@renesas.com>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH] of/irq: Add a quirk for controllers with their own definition of interrupt-map
Date: Tue, 23 Nov 2021 12:02:29 +0100	[thread overview]
Message-ID: <CAMuHMdU5UAYONbT26e2Ttd7FmoXR8SxCO86bfLLmX9VDeQ2UVg@mail.gmail.com> (raw)
In-Reply-To: <87tug3clvc.wl-maz@kernel.org>

Hi Marc,

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

  parent reply	other threads:[~2021-11-23 11:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 10:30 [PATCH] of/irq: Add a quirk for controllers with their own definition of interrupt-map Marc Zyngier
2021-11-22 13:10 ` Geert Uytterhoeven
2021-11-22 13:54   ` Marc Zyngier
2021-11-22 16:58     ` Geert Uytterhoeven
2021-11-23  7:57       ` Geert Uytterhoeven
2021-11-23  8:33         ` Marc Zyngier
2021-11-23  8:44           ` Geert Uytterhoeven
2021-11-23  9:11             ` Marc Zyngier
2021-11-24  7:54               ` Geert Uytterhoeven
2021-11-24 11:14                 ` Marc Zyngier
2021-11-27  0:42               ` Prabhakar Mahadev Lad
2021-11-29 10:34                 ` Marc Zyngier
2021-11-29 12:13                   ` Lad, Prabhakar
2021-11-29 18:33                     ` Rob Herring
2021-11-30 12:52                       ` Lad, Prabhakar
2021-11-30 18:36                         ` Marc Zyngier
2021-12-01 13:36                           ` Lad, Prabhakar
2021-12-01 14:35                             ` Rob Herring
2021-12-01 16:16                               ` Lad, Prabhakar
2021-12-05 22:27                                 ` Lad, Prabhakar
2021-12-06 10:26                                   ` Marc Zyngier
2021-12-06 16:55                                     ` Lad, Prabhakar
2021-12-06 18:59                                       ` Rob Herring
2021-11-23 11:02           ` Geert Uytterhoeven [this message]
2021-11-23  8:40 ` Sander Vanheule
2021-11-23  9:12   ` Marc Zyngier
2021-11-29 19:15 ` Rob Herring
2021-11-29 19:31   ` Marc Zyngier
2021-11-29 19:40     ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMuHMdU5UAYONbT26e2Ttd7FmoXR8SxCO86bfLLmX9VDeQ2UVg@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=biwen.li@nxp.com \
    --cc=chris.brandt@renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=john@phrozen.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).