[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=Mc1cQL+fcFOPA1NBSHh+foVyT1mxFt+R7f73PEB=Pjuyw@mail.gmail.com>
Date: Tue, 29 Jul 2025 08:58:44 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: David Thompson <davthompson@...dia.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: linus.walleij@...aro.org, davem@...emloft.net, asmaa@...dia.com,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org, Shravan Kumar Ramani <shravankr@...dia.com>
Subject: Re: [PATCH v4] gpio-mlxbf2: use platform_get_irq_optional()
On Mon, Jul 28, 2025 at 4:46 PM David Thompson <davthompson@...dia.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@...r.kernel.org
> Signed-off-by: David Thompson <davthompson@...dia.com>
> Reviewed-by: Shravan Kumar Ramani <shravankr@...dia.com>
> ---
> v4: updated logic to simply use platform_get_irq_optional()
> v3: added version history
> v2: added tag "Cc: stable@...r.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
Powered by blists - more mailing lists