Skip to contentSkip to conversation

usb: ljca: Order ACPI hardware IDs alphabetically

PATCH In review Sakari Ailus 4 participants 6 messages Oct 10, 2025 – Oct 13, 2025

Subsystems (2)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/2 usb: ljca: Order ACPI hardware IDs alphabetically

The driver has three lists of ACPI hardware IDs, for GPIO, I²C and SPI. Order them alphabetically.

---
 drivers/usb/misc/usb-ljca.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/misc/usb-ljca.c +4 -4
index c562630d862c..cf01cc727685 100644
@@ -165,26 +165,26 @@ struct ljca_match_ids_walk_data {
 };
 
 static const struct acpi_device_id ljca_gpio_hids[] = {
+	{ "INTC100B" },
 	{ "INTC1074" },
 	{ "INTC1096" },
-	{ "INTC100B" },
-	{ "INTC10D1" },
 	{ "INTC10B5" },
+	{ "INTC10D1" },
 	{},
 };
 
 static const struct acpi_device_id ljca_i2c_hids[] = {
+	{ "INTC100C" },
 	{ "INTC1075" },
 	{ "INTC1097" },
-	{ "INTC100C" },
 	{ "INTC10D2" },
 	{},
 };
 
 static const struct acpi_device_id ljca_spi_hids[] = {
+	{ "INTC100D" },
 	{ "INTC1091" },
 	{ "INTC1098" },
-	{ "INTC100D" },
 	{ "INTC10D3" },
 	{},
 };
Signature · 1 line
2.47.3
author maintainer
#1 lore raw

PATCH 2/2 usb: ljca: Improve ACPI hardware ID documentation

Document the differences between the LJCA client device ACPI hardware IDs, including the USBIO IDs used for LJCA devices.

---
 drivers/usb/misc/usb-ljca.c | 37 ++++++++++++++++++++++++-------------
 1 file changed, 24 insertions(+), 13 deletions(-)
drivers/usb/misc/usb-ljca.c +24 -13
index cf01cc727685..ebc18fae76e8 100644
@@ -164,28 +164,39 @@ struct ljca_match_ids_walk_data {
 	struct acpi_device *adev;
 };
 
+/*
+ * ACPI hardware IDs for LJCA client devices.
+ *
+ * [1] Some BIOS implementations use these IDs for denoting LJCA client devices
+ *     even though the IDs have been allocated for USBIO. This isn't a problem
+ *     as the usb-ljca driver is probed based on the USB device's vendor and
+ *     product IDs and its client drivers are probed based on auxiliary device
+ *     names, not these ACPI _HIDs. List of such systems:
+ *
+ *     Dell Precision 5490
+ */
 static const struct acpi_device_id ljca_gpio_hids[] = {
-	{ "INTC100B" },
-	{ "INTC1074" },
-	{ "INTC1096" },
-	{ "INTC10B5" },
-	{ "INTC10D1" },
+	{ "INTC100B" }, /* RPL LJCA GPIO */
+	{ "INTC1074" }, /* CVF LJCA GPIO */
+	{ "INTC1096" }, /* ADL LJCA GPIO */
+	{ "INTC10B5" }, /* LNL LJCA GPIO */
+	{ "INTC10D1" }, /* MTL (CVF VSC) USBIO GPIO [1] */
 	{},
 };
 
 static const struct acpi_device_id ljca_i2c_hids[] = {
-	{ "INTC100C" },
-	{ "INTC1075" },
-	{ "INTC1097" },
-	{ "INTC10D2" },
+	{ "INTC100C" }, /* RPL LJCA I2C */
+	{ "INTC1075" }, /* CVF LJCA I2C */
+	{ "INTC1097" }, /* ADL LJCA I2C */
+	{ "INTC10D2" }, /* MTL (CVF VSC) USBIO I2C [1] */
 	{},
 };
 
 static const struct acpi_device_id ljca_spi_hids[] = {
-	{ "INTC100D" },
-	{ "INTC1091" },
-	{ "INTC1098" },
-	{ "INTC10D3" },
+	{ "INTC100D" }, /* RPL LJCA SPI */
+	{ "INTC1091" }, /* TGL/ADL LJCA SPI */
+	{ "INTC1098" }, /* ADL LJCA SPI */
+	{ "INTC10D3" }, /* MTL (CVF VSC) USBIO SPI [1] */
 	{},
 };
 
Signature · 1 line
2.47.3
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] usb: ljca: Improve ACPI hardware ID documentation

Hi,

Quoted 4 lines · Sakari Ailus

Document the differences between the LJCA client device ACPI hardware IDs, including the USBIO IDs used for LJCA devices.

Thanks, patch looks good to me:

Regards,

Hans

Quoted 61 lines
---
 drivers/usb/misc/usb-ljca.c | 37 ++++++++++++++++++++++++-------------
 1 file changed, 24 insertions(+), 13 deletions(-)
drivers/usb/misc/usb-ljca.c +24 -13
index cf01cc727685..ebc18fae76e8 100644
@@ -164,28 +164,39 @@ struct ljca_match_ids_walk_data {
 	struct acpi_device *adev;
 };
 
+/*
+ * ACPI hardware IDs for LJCA client devices.
+ *
+ * [1] Some BIOS implementations use these IDs for denoting LJCA client devices
+ *     even though the IDs have been allocated for USBIO. This isn't a problem
+ *     as the usb-ljca driver is probed based on the USB device's vendor and
+ *     product IDs and its client drivers are probed based on auxiliary device
+ *     names, not these ACPI _HIDs. List of such systems:
+ *
+ *     Dell Precision 5490
+ */
 static const struct acpi_device_id ljca_gpio_hids[] = {
-	{ "INTC100B" },
-	{ "INTC1074" },
-	{ "INTC1096" },
-	{ "INTC10B5" },
-	{ "INTC10D1" },
+	{ "INTC100B" }, /* RPL LJCA GPIO */
+	{ "INTC1074" }, /* CVF LJCA GPIO */
+	{ "INTC1096" }, /* ADL LJCA GPIO */
+	{ "INTC10B5" }, /* LNL LJCA GPIO */
+	{ "INTC10D1" }, /* MTL (CVF VSC) USBIO GPIO [1] */
 	{},
 };
 
 static const struct acpi_device_id ljca_i2c_hids[] = {
-	{ "INTC100C" },
-	{ "INTC1075" },
-	{ "INTC1097" },
-	{ "INTC10D2" },
+	{ "INTC100C" }, /* RPL LJCA I2C */
+	{ "INTC1075" }, /* CVF LJCA I2C */
+	{ "INTC1097" }, /* ADL LJCA I2C */
+	{ "INTC10D2" }, /* MTL (CVF VSC) USBIO I2C [1] */
 	{},
 };
 
 static const struct acpi_device_id ljca_spi_hids[] = {
-	{ "INTC100D" },
-	{ "INTC1091" },
-	{ "INTC1098" },
-	{ "INTC10D3" },
+	{ "INTC100D" }, /* RPL LJCA SPI */
+	{ "INTC1091" }, /* TGL/ADL LJCA SPI */
+	{ "INTC1098" }, /* ADL LJCA SPI */
+	{ "INTC10D3" }, /* MTL (CVF VSC) USBIO SPI [1] */
 	{},
 };
 
Reviewed-by on v1 1/2
#3 lore raw
In reply to Sakari Ailus

Hi,

Quoted 4 lines · Sakari Ailus

The driver has three lists of ACPI hardware IDs, for GPIO, I²C and SPI. Order them alphabetically.

Thanks, patch looks good to me:

Note 1 remark to maybe be addressed in a separate patch below.

Quoted 9 lines
---
 drivers/usb/misc/usb-ljca.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/misc/usb-ljca.c +0 -0
index c562630d862c..cf01cc727685 100644

drivers/usb/misc/usb-ljca.c struct ljca_match_ids_walk_data { · line 171

Quoted 9 lines
drivers/usb/misc/usb-ljca.c +1 -2
@@ -165,26 +165,26 @@ struct ljca_match_ids_walk_data {
 };
 
 static const struct acpi_device_id ljca_gpio_hids[] = {
+	{ "INTC100B" },
 	{ "INTC1074" },
 	{ "INTC1096" },
-	{ "INTC100B" },
-	{ "INTC10D1" },
 	{ "INTC10B5" },

This "INTC10B5" looks weird here, I don't think this actually is in use. As can be seen by the matching "INTC10B6" HID missing from ljca_i2c_hids[]. if we really needed "INTC10B5" then I would expect "INTC10B6" to also be in the i2c list.

Regards,

Hans

Quoted 21 lines
drivers/usb/misc/usb-ljca.c +3 -2
+	{ "INTC10D1" },
 	{},
 };
 
 static const struct acpi_device_id ljca_i2c_hids[] = {
+	{ "INTC100C" },
 	{ "INTC1075" },
 	{ "INTC1097" },
-	{ "INTC100C" },
 	{ "INTC10D2" },
 	{},
 };
 
 static const struct acpi_device_id ljca_spi_hids[] = {
+	{ "INTC100D" },
 	{ "INTC1091" },
 	{ "INTC1098" },
-	{ "INTC100D" },
 	{ "INTC10D3" },
 	{},
 };
#4 lore raw
In reply to Sakari Ailus
Quoted 33 lines · Sakari Ailus

The driver has three lists of ACPI hardware IDs, for GPIO, I²C and SPI. Order them alphabetically.

---
 drivers/usb/misc/usb-ljca.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/misc/usb-ljca.c +3 -3
index c562630d862c..cf01cc727685 100644
@@ -165,26 +165,26 @@ struct ljca_match_ids_walk_data {
 };
 
 static const struct acpi_device_id ljca_gpio_hids[] = {
+	{ "INTC100B" },
 	{ "INTC1074" },
 	{ "INTC1096" },
-	{ "INTC100B" },
-	{ "INTC10D1" },
 	{ "INTC10B5" },
+	{ "INTC10D1" },
 	{},
 };
 
 static const struct acpi_device_id ljca_i2c_hids[] = {
+	{ "INTC100C" },
 	{ "INTC1075" },
 	{ "INTC1097" },
-	{ "INTC100C" },
 	{ "INTC10D2" },
 	{},

drivers/usb/misc/usb-ljca.c struct ljca_match_ids_walk_data { · line 190

Quoted 10 lines
drivers/usb/misc/usb-ljca.c +1 -1
 };
 
 static const struct acpi_device_id ljca_spi_hids[] = {
+	{ "INTC100D" },
 	{ "INTC1091" },
 	{ "INTC1098" },
-	{ "INTC100D" },
 	{ "INTC10D3" },
 	{},
 };

In the absence of any comments saying that the entries should be kept in alphabetical order, people will just add new entries to the end of each list. They won't remain in alphabetical order very long.

(Even with comments about the ordering requirement, people will submit patches with entries in the wrong positions. But at least then you can tell them to go back, read the comments, and resubmit their patches with the proper ordering.)

Just a quick observation from personal experience...

Alan Stern

#5 lore raw
In reply to Sakari Ailus
Quoted 2 lines · Sakari Ailus

The driver has three lists of ACPI hardware IDs, for GPIO, I²C and SPI. Order them alphabetically.

In the future, please say _why_ you need to do such a thing. The code will work either way, and as Alan said, this will get out-of-order over time :(

thanks,

greg k-h