From: Nirmoy Das <nirmoyd@nvidia.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Frank Li <Frank.Li@nxp.com>
Cc: Akhil R <akhilrajeev@nvidia.com>, <linux-i3c@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, Nirmoy Das <nirmoyd@nvidia.com>
Subject: [RFC PATCH 1/2] i3c: master: Emit firmware modalias for SETAASA devices
Date: Tue, 11 Aug 2026 03:38:10 -0700 [thread overview]
Message-ID: <20260811103811.3380073-1-nirmoyd@nvidia.com> (raw)
SETAASA devices are allowed to omit their PID and device information
CCCs. The I3C core can match these devices through firmware descriptions,
but the uevent and sysfs modalias paths expose only an identity-based I3C
alias.
For a PID-less SETAASA device, that alias contains no useful identity and
cannot trigger loading of a driver that matches through Device Tree or
ACPI. Such a driver can bind when already loaded, but it is not
automatically loaded for the device.
For PID-less SETAASA devices, emit the Device Tree or ACPI modalias from
both paths when available. Preserve the existing I3C identity alias for
devices that report a PID and as a fallback when no firmware modalias can
be generated.
Fixes: 3456baa2110c ("i3c: master: match I3C device through DT and ACPI")
Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
---
drivers/i3c/master.c | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index afcd7a21a3e66e..922da77cbdf324 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -283,9 +283,27 @@ static ssize_t modalias_show(struct device *dev,
{
struct i3c_device *i3c = dev_to_i3cdev(dev);
struct i3c_device_info devinfo;
+ u8 static_addr_method = 0;
u16 manuf, part, ext;
+ int ret;
+
+ i3c_bus_normaluse_lock(i3c->bus);
+ if (i3c->desc->boardinfo)
+ static_addr_method = i3c->desc->boardinfo->static_addr_method;
+ i3c_bus_normaluse_unlock(i3c->bus);
i3c_device_get_info(i3c, &devinfo);
+
+ if ((static_addr_method & I3C_ADDR_METHOD_SETAASA) && !devinfo.pid) {
+ ret = of_device_modalias(dev, buf, PAGE_SIZE);
+ if (ret != -ENODEV)
+ return ret;
+
+ ret = acpi_device_modalias(dev, buf, PAGE_SIZE - 1);
+ if (ret != -ENODEV)
+ return ret;
+ }
+
manuf = I3C_PID_MANUF_ID(devinfo.pid);
part = I3C_PID_PART_ID(devinfo.pid);
ext = I3C_PID_EXTRA_INFO(devinfo.pid);
@@ -314,9 +332,27 @@ static int i3c_device_uevent(const struct device *dev, struct kobj_uevent_env *e
{
const struct i3c_device *i3cdev = dev_to_i3cdev(dev);
struct i3c_device_info devinfo;
+ u8 static_addr_method = 0;
u16 manuf, part, ext;
+ int ret;
+
+ i3c_bus_normaluse_lock(i3cdev->bus);
+ if (i3cdev->desc->boardinfo)
+ static_addr_method = i3cdev->desc->boardinfo->static_addr_method;
+ i3c_bus_normaluse_unlock(i3cdev->bus);
i3c_device_get_info(i3cdev, &devinfo);
+
+ if ((static_addr_method & I3C_ADDR_METHOD_SETAASA) && !devinfo.pid) {
+ ret = of_device_uevent_modalias(dev, env);
+ if (ret != -ENODEV)
+ return ret;
+
+ ret = acpi_device_uevent_modalias(dev, env);
+ if (ret != -ENODEV)
+ return ret;
+ }
+
manuf = I3C_PID_MANUF_ID(devinfo.pid);
part = I3C_PID_PART_ID(devinfo.pid);
ext = I3C_PID_EXTRA_INFO(devinfo.pid);
base-commit: b6e56fd8c8a8ac7992868a28702192372ab04015
--
2.43.0
next reply other threads:[~2026-08-11 10:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 10:38 Nirmoy Das [this message]
2026-08-11 10:38 ` [RFC PATCH 2/2] i3c: master: Propagate SETAASA early device-add failures Nirmoy Das
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=20260811103811.3380073-1-nirmoyd@nvidia.com \
--to=nirmoyd@nvidia.com \
--cc=Frank.Li@nxp.com \
--cc=akhilrajeev@nvidia.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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®