From: sashiko-bot@kernel.org
To: "Michael Walle" <mwalle@kernel.org>
Cc: linux-gpio@vger.kernel.org
Subject: Re: [RFT PATCH 09/13] gpio: pcie-idio-24: create the regmap-irq chip from the gpio-regmap callback
Date: Thu, 26 Nov 2026 15:48:45 +0000 [thread overview]
Message-ID: <sashiko-outbox-235846@kernel.org> (raw)
In-Reply-To: <20261126153600.299724-10-mwalle@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] gpio: pcie-idio-24: gpio_regmap_add_irq_chip() breaks IIN0..23
IRQ requests
--
commit c95318f918a77c064e6fbf9f0881933abda168a3
Author: Michael Walle <mwalle@kernel.org>
gpio: pcie-idio-24: create the regmap-irq chip from the gpio-regmap callback
This commit converts the pcie-idio-24 GPIO driver to register its regmap
IRQ chip through the gpio_regmap_config.create_irq_domain callback using
gpio_regmap_add_irq_chip().
> diff --git a/drivers/gpio/gpio-pcie-idio-24.c b/drivers/gpio/gpio-pcie-idio-24.c
> index 8fb34398053dc..3be7aad266e0d 100644
> --- a/drivers/gpio/gpio-pcie-idio-24.c
> +++ b/drivers/gpio/gpio-pcie-idio-24.c
[ ... ]
> @@ -225,13 +229,27 @@ static int idio_24_set_type_config(unsigned int **const buf, const unsigned int
> return ret;
> }
>
> +static struct irq_domain *idio_24_create_irq_domain(struct gpio_regmap *gpio)
> +{
> + struct idio_24_gpio *const idio24gpio = gpio_regmap_get_drvdata(gpio);
> + struct irq_domain *domain;
> +
> + domain = gpio_regmap_add_irq_chip(gpio, idio24gpio->irq, 0, idio24gpio->chip);
> + if (IS_ERR(domain))
> + return dev_err_cast_probe(regmap_get_device(idio24gpio->map), domain,
> + "IRQ registration failed\n");
> +
> + return domain;
> +}
[Severity: High]
Does switching to gpio_regmap_add_irq_chip() cause IRQ requests on the
Isolated Input lines (IIN0..IIN23, offsets 24..47) to fail with
-ENOTSUPP?
Unlike devm_regmap_add_irq_chip(), gpio_regmap_add_irq_chip() installs
gpio_regmap_irq_reqres(), which calls gpiochip_reqres_irq() ->
gpiochip_lock_as_irq(). Because gc->can_sleep is false and
gc->get_direction is set, gpiochip_lock_as_irq() queries
gpiod_get_direction(). Without fixed_direction_mask configured in
gpio_config, gpio_regmap_get_direction() calls idio_24_reg_mask_xlate()
with IDIO_24_CONTROL_REG, which rejects offsets below 48:
drivers/gpio/gpio-pcie-idio-24.c:idio_24_reg_mask_xlate() {
...
case IDIO_24_CONTROL_REG:
/* We can only set direction for TTL/CMOS lines */
if (offset < 48)
return -ENOTSUPP;
...
}
As a result, requesting an interrupt on any of the 24 Isolated Input
lines fails. Setting gpio_config.fixed_direction_mask (and
fixed_direction_output for the FET outputs at offsets 0..23) or returning
the fixed directions in idio_24_reg_mask_xlate() would allow
gpiod_get_direction() to succeed.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126153600.299724-1-mwalle@kernel.org?part=9
next prev parent reply other threads:[~2026-11-26 15:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 15:35 [RFT PATCH 00/13] gpio: regmap: IRQ domain cleanups Michael Walle
2026-11-26 15:35 ` [RFT PATCH 01/13] gpio: regmap: remove gpiochip before tearing down irqchip Michael Walle
2026-11-26 15:35 ` [RFT PATCH 02/13] gpio: regmap: add a callback to create the IRQ domain Michael Walle
2026-11-26 15:47 ` sashiko-bot
2026-11-26 21:52 ` Joseph Telaak
2026-11-26 15:35 ` [RFT PATCH 03/13] gpio: rtd1625: create the IRQ domain from the gpio-regmap callback Michael Walle
2026-11-26 15:54 ` sashiko-bot
2026-11-26 15:35 ` [RFT PATCH 04/13] gpio: axiado-sgpio: " Michael Walle
2026-11-30 9:39 ` Petar Stepanovic
2026-11-30 10:11 ` Michael Walle
2026-11-26 15:35 ` [RFT PATCH 05/13] gpio: regmap: add a helper to add a regmap-irq chip Michael Walle
2026-11-26 15:35 ` [RFT PATCH 06/13] gpio: max7360: create the regmap-irq chip from the gpio-regmap callback Michael Walle
2026-11-26 20:43 ` Andy Shevchenko
2026-11-27 8:59 ` Michael Walle
2026-11-26 15:35 ` [RFT PATCH 07/13] gpio: sl28cpld: " Michael Walle
2026-11-26 15:35 ` [RFT PATCH 08/13] gpio: idio-16: " Michael Walle
2026-11-26 15:35 ` [RFT PATCH 09/13] gpio: pcie-idio-24: " Michael Walle
2026-11-26 15:48 ` sashiko-bot [this message]
2026-11-27 9:03 ` Michael Walle
2026-11-26 15:35 ` [RFT PATCH 10/13] gpio: ws16c48: " Michael Walle
2026-11-26 15:35 ` [RFT PATCH 11/13] gpio: 104-idi-48: " Michael Walle
2026-11-26 15:48 ` sashiko-bot
2026-11-26 15:35 ` [RFT PATCH 12/13] gpio: i8255: " Michael Walle
2026-11-26 15:35 ` [RFT PATCH 13/13] gpio: regmap: remove irq_domain and the regmap-irq configuration Michael Walle
2026-11-26 21:52 ` Joseph Telaak
2026-11-26 20:48 ` [RFT PATCH 00/13] gpio: regmap: IRQ domain cleanups Andy Shevchenko
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=sashiko-outbox-235846@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mwalle@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.