RE: [PATCH v3] gpio-mlxbf2: only get IRQ for device instances 0 and 3

From: David Thompson
Date: Mon Jul 28 2025 - 16:24:19 EST


> -----Original Message-----
> From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Sent: Wednesday, July 23, 2025 9:58 AM
> To: Bartosz Golaszewski <brgl@xxxxxxxx>
> Cc: David Thompson <davthompson@xxxxxxxxxx>; Mika Westerberg
> <mika.westerberg@xxxxxxxxxxxxxxx>; linus.walleij@xxxxxxxxxx;
> davem@xxxxxxxxxxxxx; Asmaa Mnebhi <asmaa@xxxxxxxxxx>; linux-
> gpio@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; stable@xxxxxxxxxxxxxxx;
> Shravan Ramani <shravankr@xxxxxxxxxx>
> Subject: Re: [PATCH v3] gpio-mlxbf2: only get IRQ for device instances 0 and 3
>
> On Tue, Jul 22, 2025 at 04:52:02PM +0200, Bartosz Golaszewski wrote:
> > On Mon, Jul 21, 2025 at 6:22 PM David Thompson <davthompson@xxxxxxxxxx>
> 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 device
> > > instances 0 and 3. The driver should not attempt to get an IRQ
> > > resource when probing device instance 1 or 2, otherwise the
> > > following error is logged:
> > > mlxbf2_gpio MLNXBF22:01: error -ENXIO: IRQ index 0 not found
>
> ...
>
> > > - irq = platform_get_irq(pdev, 0);
>
> So, why not simply change this to the _optional() call?
>

Thanks for the tip, Andy.

I've sent a v4 patch that uses this approach.

Thanks,
- Dave