From: Francesco Dolcini <francesco@dolcini.it>
To: Gianfranco Mariotti <gianfranco.mariotti94@gmail.com>
Cc: Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Emanuele Ghidoli <emanuele.ghidoli@toradex.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Francesco Dolcini <francesco.dolcini@toradex.com>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] gpio: fxl6408: Add interrupt controller support
Date: Thu, 3 Dec 2026 14:05:16 +0100 [thread overview]
Message-ID: <20261203130516.GA189372@francesco-nb> (raw)
In-Reply-To: <20261126180315.98034-6-gianfranco.mariotti94@gmail.com>
Hello Gianfranco,
I would suggest to look at the sashiko findings.
Anyway, I had a quick look.
On Thu, Nov 26, 2026 at 07:03:15PM +0100, Gianfranco Mariotti wrote:
> The FXL6408 and PI4IOE5V6408 GPIO expanders feature an open-drain
> active-low interrupt output asserted when an unmasked input transitions
> away from the state programmed in INPUT_DEFAULT_STATE (register 0x09).
> Reading INT_STS (register 0x13) clears all latched interrupt status bits
> and releases the INT line, requiring the input to return to its default
> state before another interrupt is generated.
[...]
> @@ -206,12 +276,43 @@ static int fxl6408_probe(struct i2c_client *client)
> if (ret)
> return dev_err_probe(dev, ret, "failed to write 'output high Z' register\n");
>
> + if (client->irq > 0) {
> + struct regmap_irq_chip *irq_chip;
> +
> + irq_chip = devm_kzalloc_obj(dev, *irq_chip);
this needs #include <linux/device/devres.h>, not slab
> + if (!irq_chip)
> + return -ENOMEM;
> +
> + irq_chip->name = dev_name(dev);
> + irq_chip->status_base = FXL6408_REG_INT_STS;
> + irq_chip->mask_base = FXL6408_REG_INT_MASK;
> + irq_chip->config_base = fxl6408_irq_config_base;
> + irq_chip->num_config_bases = ARRAY_SIZE(fxl6408_irq_config_base);
> + irq_chip->num_config_regs = 1;
> + irq_chip->num_regs = 1;
> + irq_chip->irqs = fxl6408_regmap_irqs;
> + irq_chip->num_irqs = ARRAY_SIZE(fxl6408_regmap_irqs);
> + 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.
Francesco
next prev parent reply other threads:[~2026-12-03 13:05 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 [this message]
2026-12-03 14:57 ` Gianfranco Mariotti
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=20261203130516.GA189372@francesco-nb \
--to=francesco@dolcini.it \
--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=gianfranco.mariotti94@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.