Re: [PATCH v2] mfd: core: Preserve OF node when ACPI handle is present

From: Andy Shevchenko

Date: Fri Mar 06 2026 - 09:38:37 EST


On Fri, Mar 06, 2026 at 01:38:06PM +0000, Lee Jones wrote:
> On Thu, 26 Feb 2026, Brian Mak wrote:

...

> > + /*
> > + * FIXME: The fwnode design doesn't allow proper stacking/sharing. This
>
> So when will this be fixed exactly?

I don't know, it's a huge task that requires of redesigning how struct
fwnode_handle looks like and how it cohabits with struct device. Do you
you think that NOTE will be more appropriate, because it may span several
releases.

> > + * should eventually turn into a device fwnode API call that will allow
> > + * prepending to a list of fwnodes (with ACPI taking precedence).
> > + *
> > + * set_primary_fwnode() is used here, instead of device_set_node(), as
> > + * device_set_node() will overwrite the existing fwnode, which may be an
> > + * OF node that was populated earlier. To support a use case where ACPI
> > + * and OF is used in conjunction, we call set_primary_fwnode() instead.
> > + */
> > + if (adev)
> > + set_primary_fwnode(&pdev->dev, acpi_fwnode_handle(adev));
> > + else
> > + set_primary_fwnode(&pdev->dev, acpi_fwnode_handle(parent));
> > }

--
With Best Regards,
Andy Shevchenko