* [PATCH v4] gpio-mlxbf2: use platform_get_irq_optional()
@ 2025-07-28 14:46 David Thompson
2025-07-29 6:58 ` Bartosz Golaszewski
2025-08-03 19:05 ` Bartosz Golaszewski
0 siblings, 2 replies; 4+ messages in thread
From: David Thompson @ 2025-07-28 14:46 UTC (permalink / raw)
To: linus.walleij, brgl, davem, asmaa
Cc: linux-gpio, linux-kernel, stable, David Thompson,
Shravan Kumar Ramani
The gpio-mlxbf2 driver interfaces with four GPIO controllers,
device instances 0-3. There are two IRQ resources shared between
the four controllers, and they are found in the ACPI table for
instances 0 and 3. The driver should not use platform_get_irq(),
otherwise this error is logged when probing instances 1 and 2:
mlxbf2_gpio MLNXBF22:01: error -ENXIO: IRQ index 0 not found
Fixes: 2b725265cb08 ("gpio: mlxbf2: Introduce IRQ support")
Cc: stable@vger.kernel.org
Signed-off-by: David Thompson <davthompson@nvidia.com>
Reviewed-by: Shravan Kumar Ramani <shravankr@nvidia.com>
---
v4: updated logic to simply use platform_get_irq_optional()
v3: added version history
v2: added tag "Cc: stable@vger.kernel.org"
drivers/gpio/gpio-mlxbf2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-mlxbf2.c b/drivers/gpio/gpio-mlxbf2.c
index 6f3dda6b635f..390f2e74a9d8 100644
--- a/drivers/gpio/gpio-mlxbf2.c
+++ b/drivers/gpio/gpio-mlxbf2.c
@@ -397,7 +397,7 @@ mlxbf2_gpio_probe(struct platform_device *pdev)
gc->ngpio = npins;
gc->owner = THIS_MODULE;
- irq = platform_get_irq(pdev, 0);
+ irq = platform_get_irq_optional(pdev, 0);
if (irq >= 0) {
girq = &gs->gc.irq;
gpio_irq_chip_set_chip(girq, &mlxbf2_gpio_irq_chip);
--
2.43.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v4] gpio-mlxbf2: use platform_get_irq_optional()
2025-07-28 14:46 [PATCH v4] gpio-mlxbf2: use platform_get_irq_optional() David Thompson
@ 2025-07-29 6:58 ` Bartosz Golaszewski
2025-07-30 5:16 ` Mika Westerberg
2025-08-03 19:05 ` Bartosz Golaszewski
1 sibling, 1 reply; 4+ messages in thread
From: Bartosz Golaszewski @ 2025-07-29 6:58 UTC (permalink / raw)
To: David Thompson, Andy Shevchenko, Mika Westerberg
Cc: linus.walleij, davem, asmaa, linux-gpio, linux-kernel, stable,
Shravan Kumar Ramani
On Mon, Jul 28, 2025 at 4:46 PM David Thompson <davthompson@nvidia.com> wrote:
>
> The gpio-mlxbf2 driver interfaces with four GPIO controllers,
> device instances 0-3. There are two IRQ resources shared between
> the four controllers, and they are found in the ACPI table for
> instances 0 and 3. The driver should not use platform_get_irq(),
> otherwise this error is logged when probing instances 1 and 2:
> mlxbf2_gpio MLNXBF22:01: error -ENXIO: IRQ index 0 not found
>
> Fixes: 2b725265cb08 ("gpio: mlxbf2: Introduce IRQ support")
> Cc: stable@vger.kernel.org
> Signed-off-by: David Thompson <davthompson@nvidia.com>
> Reviewed-by: Shravan Kumar Ramani <shravankr@nvidia.com>
> ---
> v4: updated logic to simply use platform_get_irq_optional()
> v3: added version history
> v2: added tag "Cc: stable@vger.kernel.org"
>
> drivers/gpio/gpio-mlxbf2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-mlxbf2.c b/drivers/gpio/gpio-mlxbf2.c
> index 6f3dda6b635f..390f2e74a9d8 100644
> --- a/drivers/gpio/gpio-mlxbf2.c
> +++ b/drivers/gpio/gpio-mlxbf2.c
> @@ -397,7 +397,7 @@ mlxbf2_gpio_probe(struct platform_device *pdev)
> gc->ngpio = npins;
> gc->owner = THIS_MODULE;
>
> - irq = platform_get_irq(pdev, 0);
> + irq = platform_get_irq_optional(pdev, 0);
> if (irq >= 0) {
> girq = &gs->gc.irq;
> gpio_irq_chip_set_chip(girq, &mlxbf2_gpio_irq_chip);
> --
> 2.43.2
>
Cc'ed Andy and Mika for review.
Bartosz
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v4] gpio-mlxbf2: use platform_get_irq_optional()
2025-07-29 6:58 ` Bartosz Golaszewski
@ 2025-07-30 5:16 ` Mika Westerberg
0 siblings, 0 replies; 4+ messages in thread
From: Mika Westerberg @ 2025-07-30 5:16 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: David Thompson, Andy Shevchenko, linus.walleij, davem, asmaa,
linux-gpio, linux-kernel, stable, Shravan Kumar Ramani
On Tue, Jul 29, 2025 at 08:58:44AM +0200, Bartosz Golaszewski wrote:
> On Mon, Jul 28, 2025 at 4:46 PM David Thompson <davthompson@nvidia.com> wrote:
> >
> > The gpio-mlxbf2 driver interfaces with four GPIO controllers,
> > device instances 0-3. There are two IRQ resources shared between
> > the four controllers, and they are found in the ACPI table for
> > instances 0 and 3. The driver should not use platform_get_irq(),
> > otherwise this error is logged when probing instances 1 and 2:
> > mlxbf2_gpio MLNXBF22:01: error -ENXIO: IRQ index 0 not found
> >
> > Fixes: 2b725265cb08 ("gpio: mlxbf2: Introduce IRQ support")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: David Thompson <davthompson@nvidia.com>
> > Reviewed-by: Shravan Kumar Ramani <shravankr@nvidia.com>
> > ---
> > v4: updated logic to simply use platform_get_irq_optional()
> > v3: added version history
> > v2: added tag "Cc: stable@vger.kernel.org"
> >
> > drivers/gpio/gpio-mlxbf2.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpio/gpio-mlxbf2.c b/drivers/gpio/gpio-mlxbf2.c
> > index 6f3dda6b635f..390f2e74a9d8 100644
> > --- a/drivers/gpio/gpio-mlxbf2.c
> > +++ b/drivers/gpio/gpio-mlxbf2.c
> > @@ -397,7 +397,7 @@ mlxbf2_gpio_probe(struct platform_device *pdev)
> > gc->ngpio = npins;
> > gc->owner = THIS_MODULE;
> >
> > - irq = platform_get_irq(pdev, 0);
> > + irq = platform_get_irq_optional(pdev, 0);
> > if (irq >= 0) {
> > girq = &gs->gc.irq;
> > gpio_irq_chip_set_chip(girq, &mlxbf2_gpio_irq_chip);
> > --
> > 2.43.2
> >
>
> Cc'ed Andy and Mika for review.
Looks good to me,
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v4] gpio-mlxbf2: use platform_get_irq_optional()
2025-07-28 14:46 [PATCH v4] gpio-mlxbf2: use platform_get_irq_optional() David Thompson
2025-07-29 6:58 ` Bartosz Golaszewski
@ 2025-08-03 19:05 ` Bartosz Golaszewski
1 sibling, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2025-08-03 19:05 UTC (permalink / raw)
To: linus.walleij, brgl, davem, asmaa, David Thompson
Cc: Bartosz Golaszewski, linux-gpio, linux-kernel, stable,
Shravan Kumar Ramani
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Mon, 28 Jul 2025 10:46:19 -0400, David Thompson wrote:
> The gpio-mlxbf2 driver interfaces with four GPIO controllers,
> device instances 0-3. There are two IRQ resources shared between
> the four controllers, and they are found in the ACPI table for
> instances 0 and 3. The driver should not use platform_get_irq(),
> otherwise this error is logged when probing instances 1 and 2:
> mlxbf2_gpio MLNXBF22:01: error -ENXIO: IRQ index 0 not found
>
> [...]
Subject should have been: "gpio: mlxbf2: ..."
Applied, thanks!
[1/1] gpio-mlxbf2: use platform_get_irq_optional()
https://git.kernel.org/brgl/linux/c/63c7bc53a35e785accdc2ceab8f72d94501931ab
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-03 19:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-28 14:46 [PATCH v4] gpio-mlxbf2: use platform_get_irq_optional() David Thompson
2025-07-29 6:58 ` Bartosz Golaszewski
2025-07-30 5:16 ` Mika Westerberg
2025-08-03 19:05 ` Bartosz Golaszewski
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).