Re: [PATCH RFT/RFC 2/2] mfd: cs42l43: use GPIO machine lookup for cs-gpios

From: Charles Keepax

Date: Wed Nov 19 2025 - 11:44:19 EST


On Wed, Nov 19, 2025 at 05:28:54PM +0100, Bartosz Golaszewski wrote:
> On Wed, Nov 19, 2025 at 4:52 PM Charles Keepax
> <ckeepax@xxxxxxxxxxxxxxxxxxxxx> wrote:
> > On Wed, Nov 19, 2025 at 04:35:07PM +0100, Bartosz Golaszewski wrote:
> > > On Wed, Nov 19, 2025 at 4:21 PM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
> > props = devm_kmemdup(priv->dev, cs42l43_cs_props,
> > sizeof(cs42l43_cs_props), GFP_KERNEL);
> > if (!props)
> > return -ENOMEM;
> >
> > args = devm_kmemdup(priv->dev, cs42l43_cs_refs,
> > sizeof(cs42l43_cs_refs), GFP_KERNEL);
> > if (!args)
> > return -ENOMEM;
> >
> > args[0].fwnode = fwnode;
> > props->pointer = props;
> >
> > ie. As your patches add support for using the geniune firmware
> > node just do so.
> >
>
> But do you have the firmware node at the time of doing the above? The
> software node must first be registered with the swnode subsystem to
> become an actual firmware node. Only then can you reference it by its
> firmware node address.

The firmware node here isn't referring to a software node it is
referring to the actual ACPI node. As in we are now correctly
specifying the GPIO using the ACPI node rather than depending on
the name based lookup to find the driver. The problem was before
your patches we couldn't do that as it wasn't possible.

I have sent a patch for you guys to have a look at and see what
you think. I am slightly inclined to favour that approach since
it changes a lot less about the system and once we are no longer
relying on name based look up I think everything the driver is
doing is all above board and legit.

Thanks,
Charels