From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Kartik Rajput <kkartik@nvidia.com>
Cc: lenb@kernel.org, sakari.ailus@linux.intel.com,
mika.westerberg@linux.intel.com, thierry.reding@gmail.com,
jonathanh@nvidia.com, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] ACPI: bus: Use OF match data for PRP0001 matched devices
Date: Thu, 8 Jan 2026 20:05:30 +0200 [thread overview]
Message-ID: <aV_x6nlu0Rlqn2ZQ@smile.fi.intel.com> (raw)
In-Reply-To: <abfdb44d-108a-49d5-98ad-949d184f4f98@nvidia.com>
On Thu, Jan 08, 2026 at 05:57:35PM +0530, Kartik Rajput wrote:
> On 07/01/26 21:17, Andy Shevchenko wrote:
> > On Wed, Jan 07, 2026 at 05:33:18PM +0530, Kartik Rajput wrote:
> > > When a device is matched via PRP0001, the driver's OF (DT) match table
> > > must be used to obtain the device match data. If a driver provides both
> > > an acpi_match_table and an of_match_table, the current
> > > acpi_device_get_match_data() path consults the driver's acpi_match_table
> > > and returns NULL (no ACPI ID matches).
> >
> > Since we have both tables, why the actual ACPI HID of the device in question
> > (actually which one?) can't be used?
> >
> > > Explicitly detect PRP0001 and fetch match data from the driver's
> > > of_match_table via acpi_of_device_get_match_data().
> >
> > In principle we can go this way, but can you tell a bit more of a story?
> > Why the device in question can't use existed or a newly allocated ACPI HID for
> > that?
>
> While testing PRP0001-based matching with the Tegra fuse driver on an SoC that does
> not yet have an allocated ACPI HID,
Which means in the production you do not need this patch. Allocate ID and go with it.
> device_get_match_data() returned NULL because
> the driver also provides an acpi_match_table.
>
> Commit 886ca88be6b3 ("ACPI / bus: Respect PRP0001 when retrieving device match data")
> was intended to address this by honoring PRP0001 when retrieving match data. However,
> when a driver provides an ACPI match table, acpi_device_get_match_data() currently
> consults only that table, resulting in NULL match data despite a successful
> PRP0001 match.
Which is expected behaviour. So there are two cases I can see that might make
this patch valid:
1) the preproduction development when the driver has both tables and formal
ACPI HID is not allocated yet (this what has to be the main "why" point
in the commit message);
2) a driver that got ACPI HID from somebody else and breaks the PRP0001 setups
for others (no evidences so far, but I admit there is a potential to have a
such).
That said, having the Fixes tag is unrequired.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-01-08 18:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 12:03 [PATCH v2] ACPI: bus: Use OF match data for PRP0001 matched devices Kartik Rajput
2026-01-07 12:38 ` Sakari Ailus
2026-01-08 11:18 ` Kartik Rajput
2026-01-07 12:54 ` Rafael J. Wysocki
2026-01-08 11:23 ` Kartik Rajput
2026-01-07 15:47 ` Andy Shevchenko
2026-01-08 12:27 ` Kartik Rajput
2026-01-08 18:05 ` Andy Shevchenko [this message]
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=aV_x6nlu0Rlqn2ZQ@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=jonathanh@nvidia.com \
--cc=kkartik@nvidia.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=sakari.ailus@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=thierry.reding@gmail.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