Thread (57 messages) 57 messages, 9 authors, 2026-03-31

Re: [PATCH 03/12] i3c: master: Use unified device property interface

From: Rob Herring <robh@kernel.org>
Date: 2026-03-26 15:18:51
Also in: linux-acpi, linux-hwmon, linux-i3c, linux-tegra, lkml

On Wed, Mar 18, 2026 at 10:57:16PM +0530, Akhil R wrote:
quoted hunk ↗ jump to hunk
Replace all OF-specific functions with unified device property functions
as a prerequisite to support both ACPI and device tree.

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
---
 drivers/i3c/master.c       | 91 ++++++++++++++++++++++----------------
 include/linux/i3c/master.h |  5 ++-
 2 files changed, 55 insertions(+), 41 deletions(-)
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index c32847bc4d0d..2c479fecbfdf 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
[...]
quoted hunk ↗ jump to hunk
@@ -3300,11 +3310,14 @@ static int __init i3c_init(void)
 {
 	int res;
 
-	res = of_alias_get_highest_id("i3c");
-	if (res >= 0) {
-		mutex_lock(&i3c_core_lock);
-		__i3c_first_dynamic_bus_num = res + 1;
-		mutex_unlock(&i3c_core_lock);
+	/* of_alias_get_highest_id is DT-specific, only call for DT systems */
+	if (IS_ENABLED(CONFIG_OF)) {
BTW, CONFIG_OF is *always* enabled on arm64.
+		res = of_alias_get_highest_id("i3c");
This will just return an error if not booting with DT or if CONFIG_OF is 
disabled.
+		if (res >= 0) {
+			mutex_lock(&i3c_core_lock);
+			__i3c_first_dynamic_bus_num = res + 1;
+			mutex_unlock(&i3c_core_lock);
+		}
 	}
 
 	res = bus_register_notifier(&i2c_bus_type, &i2cdev_notifier);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help