Re: [PATCH RFC 03/11] driver core: platform: Add static ACPI nodes IRQ retrieval/mapping code
From: Lorenzo Pieralisi
Date: Fri Sep 25 2026 - 06:16:44 EST
On Fri, Sep 25, 2026 at 12:54:15PM +0300, Andy Shevchenko wrote:
> On Fri, Sep 25, 2026 at 09:48:02AM +0200, Lorenzo Pieralisi wrote:
> > ACPI static fwnodes types are not contemplated in the current
> >
> > platform_get_irq_affinity()
> >
> > implementation that is there to retrieve and map IRQs for a device.
> >
> > Add fwnode_irq_get() to platform_get_irq_affinity() for static ACPI fwnodes
> > to overcome this shortcoming, enabling IRQ retrieval and mapping for the
> > ACPI static fwnode type.
> >
> > Signed-off-by: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
> > Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Cc: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
> > Cc: Danilo Krummrich <dakr@xxxxxxxxxx>
> > ---
>
> Same about the Cc list...
>
> ...
>
> > + if (is_acpi_static_node(fwnode)) {
> > + ret = fwnode_irq_get(fwnode, num);
> > + if (ret > 0 || ret == -EPROBE_DEFER)
> > + goto out;
> > + }
>
> This even doesn't sound right. If you know this is an ACPI-only feature what
> the fwnode has all to do with it? Call the respective ACPI-oriented function.
Yes, you are right, it is a last minute change since I noticed that just
calling fwnode_irq_get() without guards would catch previous failures so
it makes sense to do it on specific fwnode type (with is_acpi_static_node()
exported also for !CONFIG_ACPI).
Thanks,
Lorenzo