Linux USB
 help / color / mirror / Atom feed
* [PATCH 1/2] usb: ljca: Order ACPI hardware IDs alphabetically
@ 2025-10-10  5:56 Sakari Ailus
  2025-10-10  5:56 ` [PATCH 2/2] usb: ljca: Improve ACPI hardware ID documentation Sakari Ailus
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Sakari Ailus @ 2025-10-10  5:56 UTC (permalink / raw)
  To: linux-usb; +Cc: Lixu Zhang, Greg Kroah-Hartman, Hans de Goede

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

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/usb/misc/usb-ljca.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c
index c562630d862c..cf01cc727685 100644
--- a/drivers/usb/misc/usb-ljca.c
+++ b/drivers/usb/misc/usb-ljca.c
@@ -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" },
 	{},
 };
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] usb: ljca: Improve ACPI hardware ID documentation
  2025-10-10  5:56 [PATCH 1/2] usb: ljca: Order ACPI hardware IDs alphabetically Sakari Ailus
@ 2025-10-10  5:56 ` Sakari Ailus
  2025-10-10 13:42   ` Hans de Goede
  2025-10-10 13:42 ` [PATCH 1/2] usb: ljca: Order ACPI hardware IDs alphabetically Hans de Goede
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Sakari Ailus @ 2025-10-10  5:56 UTC (permalink / raw)
  To: linux-usb; +Cc: Lixu Zhang, Greg Kroah-Hartman, Hans de Goede

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

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/usb/misc/usb-ljca.c | 37 ++++++++++++++++++++++++-------------
 1 file changed, 24 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c
index cf01cc727685..ebc18fae76e8 100644
--- a/drivers/usb/misc/usb-ljca.c
+++ b/drivers/usb/misc/usb-ljca.c
@@ -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] */
 	{},
 };
 
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] usb: ljca: Order ACPI hardware IDs alphabetically
  2025-10-10  5:56 [PATCH 1/2] usb: ljca: Order ACPI hardware IDs alphabetically Sakari Ailus
  2025-10-10  5:56 ` [PATCH 2/2] usb: ljca: Improve ACPI hardware ID documentation Sakari Ailus
@ 2025-10-10 13:42 ` Hans de Goede
  2025-10-10 14:59 ` Alan Stern
  2025-10-13  7:26 ` Greg Kroah-Hartman
  3 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2025-10-10 13:42 UTC (permalink / raw)
  To: Sakari Ailus, linux-usb; +Cc: Lixu Zhang, Greg Kroah-Hartman

Hi,

On 10-Oct-25 7:56 AM, Sakari Ailus wrote:
> The driver has three lists of ACPI hardware IDs, for GPIO, I²C and SPI.
> Order them alphabetically.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hansg@kernel.org>

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



> ---
>  drivers/usb/misc/usb-ljca.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c
> index c562630d862c..cf01cc727685 100644
> --- a/drivers/usb/misc/usb-ljca.c
> +++ b/drivers/usb/misc/usb-ljca.c
> @@ -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




> +	{ "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" },
>  	{},
>  };


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] usb: ljca: Improve ACPI hardware ID documentation
  2025-10-10  5:56 ` [PATCH 2/2] usb: ljca: Improve ACPI hardware ID documentation Sakari Ailus
@ 2025-10-10 13:42   ` Hans de Goede
  0 siblings, 0 replies; 6+ messages in thread
From: Hans de Goede @ 2025-10-10 13:42 UTC (permalink / raw)
  To: Sakari Ailus, linux-usb; +Cc: Lixu Zhang, Greg Kroah-Hartman

Hi,

On 10-Oct-25 7:56 AM, Sakari Ailus wrote:
> Document the differences between the LJCA client device ACPI hardware IDs,
> including the USBIO IDs used for LJCA devices.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hansg@kernel.org>

Regards,

Hans



> ---
>  drivers/usb/misc/usb-ljca.c | 37 ++++++++++++++++++++++++-------------
>  1 file changed, 24 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c
> index cf01cc727685..ebc18fae76e8 100644
> --- a/drivers/usb/misc/usb-ljca.c
> +++ b/drivers/usb/misc/usb-ljca.c
> @@ -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] */
>  	{},
>  };
>  


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] usb: ljca: Order ACPI hardware IDs alphabetically
  2025-10-10  5:56 [PATCH 1/2] usb: ljca: Order ACPI hardware IDs alphabetically Sakari Ailus
  2025-10-10  5:56 ` [PATCH 2/2] usb: ljca: Improve ACPI hardware ID documentation Sakari Ailus
  2025-10-10 13:42 ` [PATCH 1/2] usb: ljca: Order ACPI hardware IDs alphabetically Hans de Goede
@ 2025-10-10 14:59 ` Alan Stern
  2025-10-13  7:26 ` Greg Kroah-Hartman
  3 siblings, 0 replies; 6+ messages in thread
From: Alan Stern @ 2025-10-10 14:59 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-usb, Lixu Zhang, Greg Kroah-Hartman, Hans de Goede

On Fri, Oct 10, 2025 at 08:56:24AM +0300, Sakari Ailus wrote:
> The driver has three lists of ACPI hardware IDs, for GPIO, I²C and SPI.
> Order them alphabetically.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/usb/misc/usb-ljca.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/misc/usb-ljca.c b/drivers/usb/misc/usb-ljca.c
> index c562630d862c..cf01cc727685 100644
> --- a/drivers/usb/misc/usb-ljca.c
> +++ b/drivers/usb/misc/usb-ljca.c
> @@ -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" },
>  	{},
>  };

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] usb: ljca: Order ACPI hardware IDs alphabetically
  2025-10-10  5:56 [PATCH 1/2] usb: ljca: Order ACPI hardware IDs alphabetically Sakari Ailus
                   ` (2 preceding siblings ...)
  2025-10-10 14:59 ` Alan Stern
@ 2025-10-13  7:26 ` Greg Kroah-Hartman
  3 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2025-10-13  7:26 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-usb, Lixu Zhang, Hans de Goede

On Fri, Oct 10, 2025 at 08:56:24AM +0300, Sakari Ailus wrote:
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-10-13  7:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-10  5:56 [PATCH 1/2] usb: ljca: Order ACPI hardware IDs alphabetically Sakari Ailus
2025-10-10  5:56 ` [PATCH 2/2] usb: ljca: Improve ACPI hardware ID documentation Sakari Ailus
2025-10-10 13:42   ` Hans de Goede
2025-10-10 13:42 ` [PATCH 1/2] usb: ljca: Order ACPI hardware IDs alphabetically Hans de Goede
2025-10-10 14:59 ` Alan Stern
2025-10-13  7:26 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox