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

Andy Shevchenko
2026-04-02T16:18:15Z

On Thu, Apr 02, 2026 at 06:13:38PM +0200, Bartosz Golaszewski wrote:
> On Thu, Apr 2, 2026 at 6:05 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > 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@linux.intel.com> 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@linux.intel.com> 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.
>
> Yeah that would be awesome but you still need to export these software
> nodes to the x86-android-tablets driver. I think it's better to keep
> them in the driver as it's the only user and it's unlikely there'll be
> more similar cases.

As I mentioned, the mentioned driver is a specific enumeration for the given
platform(s), it's the best place to keep things there related to LPSS island on
those platforms (SoCs). Exporting is fine as that driver makes the whole SoC
somewhat useful, otherwise it's just piece of x86 core which makes a little
sense to have without the crucial peripheral drivers be enabled.

--
With Best Regards,
Andy Shevchenko