Re: [PATCH v2 0/4] platform/x86: x86-android-tablets: use real firmware node references with intel drivers

From: Andy Shevchenko

Date: Thu Apr 02 2026 - 12:13:02 EST


On Thu, Apr 02, 2026 at 05:03:10PM +0200, Bartosz Golaszewski wrote:
> On Thu, Apr 2, 2026 at 3:47 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > On Thu, Apr 02, 2026 at 03:35:24PM +0200, Bartosz Golaszewski wrote:
> > > On Thu, Apr 2, 2026 at 3:23 PM Andy Shevchenko
> > > <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

...

> > > > > 3. Export the acpi_bus_type symbol. It's already available in the
> > > > > acpi_bus.h header but it's not available to loadable modules.
> > > >
> > > > Nowadays we don't do that but export the dev_is_acpi() or something similar if
> > > > it's not yet available and to_acpi_dev(). (Names are derived from the existing
> > > > pattern, they might be need to be adjusted, dunno.) See how PNP does that.
> > > > Note, I haven't read the patches yet, just a quick comment.
> > >
> > > Maybe I should have said why I do it. It's to register a notifier call
> > > on ACPI bus events. Is there a better way to do this?
> >
> > AFAIU there shouldn't be pure ACPI devices, they are companions to the real
> > ones. Can we simply attach to the normal device notifier and check if the
> > companion is what we are looking for? Also since it's specific to that driver
> > and you know what the platforms you are looking for, why can't we hook
> > something into drivers/acpi/x86/lpss.c?
>
> The ACPI companions seem to only ever be added once and never removed
> - unlike platform devices. This is why I prefer to check the ACPI bus.
>
> As for lpss.c - what do you sugest exactly because at first glance I'm
> not quite sure what's there to hook up?

Can't we create / submit the software node of the given device (GPIO)
when it's get created (as platform device)? That driver uses a notification
when ACPI bus is scanned, that's what may trigger the software node creation
and the other end will eventually see it.

--
With Best Regards,
Andy Shevchenko