public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Linus Walleij <linusw@kernel.org>
Cc: Lee Jones <lee@kernel.org>, Bartosz Golaszewski <brgl@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	patches@opensource.cirrus.com, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: mfd: wlf,arizona: Add irq-gpios
Date: Tue, 17 Mar 2026 13:22:06 +0000	[thread overview]
Message-ID: <ablVfujW/bkt4X3S@opensource.cirrus.com> (raw)
In-Reply-To: <20260317-mfd-arizona-irq-v2-1-9ea546f517dc@kernel.org>

On Tue, Mar 17, 2026 at 10:28:31AM +0100, Linus Walleij wrote:
> The Wolfson Microelectronics Arizona sometimes needs to poll the
> GPIO line corresponding to the IRQ to counter bugs in the hardware
> that appear on edge-triggered IRQs.
> 
> For this situation, provide the optional irq-gpios property.
> 
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
>  Documentation/devicetree/bindings/mfd/wlf,arizona.yaml | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/wlf,arizona.yaml b/Documentation/devicetree/bindings/mfd/wlf,arizona.yaml
> index 7902f3c5d289..dbf1f1e0a57e 100644
> --- a/Documentation/devicetree/bindings/mfd/wlf,arizona.yaml
> +++ b/Documentation/devicetree/bindings/mfd/wlf,arizona.yaml
> @@ -194,6 +194,15 @@ properties:
>    reset-gpios:
>      maxItems: 1
>  
> +  irq-gpios:
> +    maxItems: 1
> +    description:
> +      Nominally a functional IRQ should be provided in the interrupts
> +      property. However due to glitches in the hardware, the GPIO line
> +      corresponding to the IRQ sometimes need to be iteratively polled to
> +      check for the triggering edge. If this bug is present, the GPIO line
> +      should be passed here.

I would perhaps reword this a little. Its not really about
bugs/glitches. This feature is for hosts that only support edge
triggered IRQs. The codec IRQ output is level based, so if the
host only supports edge triggered IRQs then IRQs can be missed
as they don't necessarily generate another edge. This adds a
polling loop to ensure the IRQ line has deasserted before exiting
the IRQ handler, forcing the next IRQ to generate another edge.
Perhaps something like:

  A functional IRQ should be provided in the interrupts
  property. This property enables edge triggered IRQ emulation
  for hosts that don't support the codecs level triggered IRQ
  output. The GPIO line corresponding to the IRQ will be polled
  until all IRQs have been handled, ensuring an edge is generated
  for the next IRQ.

Thanks,
Charles

  reply	other threads:[~2026-03-17 13:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17  9:28 [PATCH v2 0/2] mfd: arizona: Move IRQ GPIO to GPIO descriptor Linus Walleij
2026-03-17  9:28 ` [PATCH v2 1/2] dt-bindings: mfd: wlf,arizona: Add irq-gpios Linus Walleij
2026-03-17 13:22   ` Charles Keepax [this message]
2026-03-17  9:28 ` [PATCH v2 2/2] mfd: arizona: Convert GPIO IRQ handling to descriptors Linus Walleij
2026-03-17 13:13   ` Charles Keepax

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=ablVfujW/bkt4X3S@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --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