Re: [PATCH 2/4] pinctrl: intel: expose software nodes for baytrail GPIO devices

From: Andy Shevchenko

Date: Fri Mar 20 2026 - 06:40:45 EST


On Fri, Mar 20, 2026 at 12:38:24PM +0200, Andy Shevchenko wrote:
> On Thu, Mar 19, 2026 at 05:10:55PM +0100, Bartosz Golaszewski wrote:
> > Use the new automatic secondary fwnode API to ensure that when the
> > baytrail pinctrl device is added to the platform bus, the static
> > software node provided for drivers not able to use ACPI will get
> > automatically assigned as the secondary fwnode of the primary ACPI node.
> >
> > Create a new header under linux/pinctrl/ containing intel-specific
> > symbols and declare the new variables there.
>
> As I read the code, this doesn't need to be part of drivers/pinctrl/intel/.
> I.o.w. I am unable to see why we need to penetrate the certain pinctrl
> driver for this.

...

> > static int __init byt_gpio_init(void)
> > {
> > - return platform_driver_register(&byt_gpio_driver);
> > + int ret;
> > +
> > + ret = software_node_register_auto_secondary(&byt_auto_secondary);
> > + if (ret)
> > + return ret;
> > +
> > + ret = platform_driver_register(&byt_gpio_driver);
> > + if (ret)
> > + software_node_unregister_auto_secondary(&byt_auto_secondary);
> > +
> > + return ret;
> > }
>
> This hack can be done in similar way on how we do ACPI LPSS for those
> platforms, i.e. in drivers/acpi/x86/lpss.c. No?

Note, that driver is used on above mentioned platforms. Without it they are
basically useless. With that said, requiring that driver is fine and good thing
to do on those platforms (Bay Trail and Cherry View).

--
With Best Regards,
Andy Shevchenko