From: Gianfranco Mariotti <gianfranco.mariotti94@gmail.com>
To: francesco@dolcini.it
Cc: andy.shevchenko@gmail.com, brgl@kernel.org, conor+dt@kernel.org,
devicetree@vger.kernel.org, emanuele.ghidoli@toradex.com,
francesco.dolcini@toradex.com, gianfranco.mariotti94@gmail.com,
krzk+dt@kernel.org, linusw@kernel.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
robh@kernel.org
Subject: Re: [PATCH 5/5] gpio: fxl6408: Add interrupt controller support
Date: Thu, 3 Dec 2026 15:57:09 +0100 [thread overview]
Message-ID: <20261203145709.23443-1-gianfranco.mariotti94@gmail.com> (raw)
In-Reply-To: <20261203130516.GA189372@francesco-nb>
Hi Francesco,
Thanks for taking a look.
On Thu, Dec 03, 2026 at 02:05:16PM +0100, Francesco Dolcini wrote:
> I would suggest to look at the sashiko findings.
Yes, I went through all the sashiko findings on both patch 1/5 and
patch 5/5 and addressed them for v2 (dropping num_reg_defaults_raw so
regcache_hw_init() does not read reserved or clear-on-read registers,
and reworking the IRQ and suspend/resume handling as noted below).
> Anyway, I had a quick look.
[...]
> > + irq_chip = devm_kzalloc_obj(dev, *irq_chip);
>
> this needs #include <linux/device/devres.h>, not slab
Good catch, I will replace <linux/slab.h> with <linux/device/devres.h>
in v2.
> > + irq_chip->init_ack_masked = true;
> > + irq_chip->clear_on_unmask = true;
>
> Race condition if we unmask an interrupt with one already active? The
> register clears on read.
Indeed, with regmap-irq, clear_on_unmask discards the value read from
INT_STS, which would drop a pending interrupt on another already
unmasked line (and regmap-irq also updates INPUT_DEFAULT_STATE before
masking when reconfiguring trigger polarity, as sashiko pointed out).
For v2 I have replaced regmap-irq with a custom immutable irq_chip and
irq_domain that updates INPUT_DEFAULT_STATE while masked, saves any
status bits latched on other active lines when clearing INT_STS before
unmasking (waking the IRQ thread via irq_wake_thread()), and handles
RST_INT and wakeup lines across suspend and resume.
Best regards,
Gianfranco
prev parent reply other threads:[~2026-12-03 14:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 18:03 [PATCH 0/5] gpio: fxl6408: Fix regmap ranges/bursts and add PI4IOE5V6408, reset, bias, and IRQ support Gianfranco Mariotti
2026-11-26 18:03 ` [PATCH 1/5] gpio: fxl6408: Fix reserved register access and disable burst transfers Gianfranco Mariotti
2026-11-26 18:19 ` sashiko-bot
2026-11-26 18:03 ` [PATCH 2/5] dt-bindings: gpio: Split fcs,fxl6408 from trivial-gpio and add diodes,pi4ioe5v6408 Gianfranco Mariotti
2026-11-26 18:03 ` [PATCH 3/5] gpio: fxl6408: Support optional power supplies and reset GPIO Gianfranco Mariotti
2026-11-26 18:03 ` [PATCH 4/5] gpio: fxl6408: Add pull-up and pull-down bias configuration Gianfranco Mariotti
2026-11-26 18:03 ` [PATCH 5/5] gpio: fxl6408: Add interrupt controller support Gianfranco Mariotti
2026-11-26 18:25 ` sashiko-bot
2026-12-03 13:05 ` Francesco Dolcini
2026-12-03 14:57 ` Gianfranco Mariotti [this message]
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=20261203145709.23443-1-gianfranco.mariotti94@gmail.com \
--to=gianfranco.mariotti94@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=emanuele.ghidoli@toradex.com \
--cc=francesco.dolcini@toradex.com \
--cc=francesco@dolcini.it \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.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