From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@kernel.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Daniel Scally <djrscally@gmail.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Danilo Krummrich <dakr@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
linux-acpi@vger.kernel.org, driver-core@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] software node: allow referencing software nodes by name
Date: Thu, 26 Mar 2026 10:48:49 +0200 [thread overview]
Message-ID: <acTy8Wkfs8Sx84oZ@ashevche-desk.local> (raw)
In-Reply-To: <acTwqD8fXZSncMIS@ashevche-desk.local>
On Thu, Mar 26, 2026 at 10:39:09AM +0200, Andy Shevchenko wrote:
> On Thu, Mar 26, 2026 at 09:34:01AM +0100, Bartosz Golaszewski wrote:
> > On Thu, Mar 26, 2026 at 9:27 AM Andy Shevchenko
> > <andriy.shevchenko@linux.intel.com> wrote:
> > > On Wed, Mar 25, 2026 at 05:32:06PM +0100, Bartosz Golaszewski wrote:
> > > > On Tue, Mar 24, 2026 at 8:30 PM Dmitry Torokhov
> > > > <dmitry.torokhov@gmail.com> wrote:
> > > > >
> > > > > Please post the reworked version so we can review all the details. My
> > > > > concern was that it relies on notifier chains to notify when devices
> > > > > get registered and unregistered, and instead of matching node names you
> > > > > now need to somehow match device instances and software node instances,
> > > > > which again likely is done based on some name. This just piles on
> > > > > complexity where a simpler solution would be sufficient.
> > > >
> > > > I will post it. Hopefully before the end of the week. I want to cover
> > > > both OF nodes with paz00 as well as ACPI with android tablets. The
> > > > latter case will have to wait for devices because there's no way to
> > > > look up an ACPI node by name that I could idenfity (correct me if I'm
> > > > wrong).
> > >
> > > What do you need from ACPI exactly? The ACPI namespace in the OS is represented
> > > by set of ACPI handles, each of which is the object pointing out to some object
> > > in it. Any object in ACPI has a unique path. At any time, after parsing the
> > > ACPI table(s) into ACPI namespace we may get a handle based on the path.
> >
> > DT is unflattened very early into the boot sequence. Is this the case
> > for ACPI tables as well? Knowing the name of the device (HID + index,
> > eg.: "INT33FF:00"), can I check if there's a corresponding ACPI node
> > (of_find_by_path/name() in DT parlance)?
>
> I believe so. See how we find a GPIO chip in the gpiolib-acpi-core.c.
> In the similar way you can try finding any object in ACPI namespace.
>
> But note, ":00" is part of device instance name, it's not available
> in ACPI namespace. There we have HID, UID, et cetera, ":00" is pure
> Linux kernel thingy.
We have acpi_dev_present(), but if you read its kernel-doc, it suggests
to use acpi_get_devices() for the case of early checks (before device
are actually being instantiated).
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-03-26 8:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 4:46 Dmitry Torokhov
2026-03-24 7:59 ` Greg Kroah-Hartman
2026-03-24 16:25 ` Dmitry Torokhov
2026-03-24 9:46 ` Bartosz Golaszewski
2026-03-24 19:30 ` Dmitry Torokhov
2026-03-25 16:32 ` Bartosz Golaszewski
2026-03-25 18:11 ` Dmitry Torokhov
2026-03-26 8:26 ` Andy Shevchenko
2026-03-26 8:28 ` Andy Shevchenko
2026-03-26 8:34 ` Bartosz Golaszewski
2026-03-26 8:39 ` Andy Shevchenko
2026-03-26 8:47 ` Bartosz Golaszewski
2026-03-26 9:03 ` Andy Shevchenko
2026-03-26 8:48 ` Andy Shevchenko [this message]
2026-03-26 15:47 ` Bartosz Golaszewski
2026-03-26 19:01 ` Andy Shevchenko
2026-03-31 12:18 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acTy8Wkfs8Sx84oZ@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=brgl@kernel.org \
--cc=dakr@kernel.org \
--cc=djrscally@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®