Re: [PATCH v1 1/1] pinctrl: pinconf-generic: Use only fwnode API in parse_dt_cfg()

From: Andy Shevchenko

Date: Tue Mar 17 2026 - 04:32:58 EST


On Tue, Mar 10, 2026 at 10:19:40AM +0100, Linus Walleij wrote:
> On Thu, Mar 5, 2026 at 10:50 AM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> > The parse_dt_cfg() uses OF and fwnode APIs. Fix this inconsistency by
> > fully switching it to use fwnode API and rename the function accordingly.
> >
> > While at it, add missing linux/property.h inclusion.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
>
> Patch applied, because obviously the kernel looks better after
> this patch than before it.
>
> I had to rebase the last hunk of changes manually.
>
> I think there is something more to do, but you probably
> already have a plan:
>
> > - ret = parse_dt_cfg(np, dt_params, ARRAY_SIZE(dt_params), cfg, &ncfg);
> > + ret = parse_fw_cfg(fwnode, dt_params, ARRAY_SIZE(dt_params), cfg, &ncfg);
>
> and that uses:
>
> #ifdef CONFIG_OF
> static const struct pinconf_generic_params dt_params[] = {
> { "bias-bus-hold", PIN_CONFIG_BIAS_BUS_HOLD, 0 },
> { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },

Yes, this all is still OF-centric code. The patch was solely for bringing a bit
of consistency into one (parse_fw_cfg()) function. For now not much plans are here
because ACPI case most likely will require something totally (with the reuse of
the opaque pointers to the mappings, though) different.

> Are you already working on a patch? ;)

Actually I found one improvement I need to submit.

And looking now at pinconf_generic_parse_dt_pinmux() it also can be translated
to fwnode inside.

--
With Best Regards,
Andy Shevchenko