Skip to contentSkip to conversation

usb: misc: ljca: Drop _ADR support to get ljca children devices

PATCH In review Wentong Wu 3 participants 3 messages Nov 14, 2023

Subsystems (2)
lore
Share & tools
lore

Wentong Wu

author
#0 lore raw

PATCH 1/1 usb: misc: ljca: Drop _ADR support to get ljca children devices

Currently the shipped platforms use only _HID to distinguish ljca children devices. The _ADR support here is for future HW. This patch is to drop _ADR support and we can then re-introduce it (revert this patch) if future HW actually starts using _ADR to distinguish children devices.

---
 drivers/usb/misc/usb-ljca.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/usb/misc/usb-ljca.c +2 -12
index c9decd0396d4..7f0deebebc13 100644
@@ -457,8 +457,8 @@ static void ljca_auxdev_acpi_bind(struct ljca_adapter *adap,
 				  u64 adr, u8 id)
 {
 	struct ljca_match_ids_walk_data wd = { 0 };
-	struct acpi_device *parent, *adev;
 	struct device *dev = adap->dev;
+	struct acpi_device *parent;
 	char uid[4];
 
 	parent = ACPI_COMPANION(dev);
@@ -466,17 +466,7 @@ static void ljca_auxdev_acpi_bind(struct ljca_adapter *adap,
 		return;
 
 	/*
-	 * get auxdev ACPI handle from the ACPI device directly
-	 * under the parent that matches _ADR.
-	 */
-	adev = acpi_find_child_device(parent, adr, false);
-	if (adev) {
-		ACPI_COMPANION_SET(&auxdev->dev, adev);
-		return;
-	}
-
-	/*
-	 * _ADR is a grey area in the ACPI specification, some
+	 * Currently LJCA hw doesn't use _ADR instead the shipped
 	 * platforms use _HID to distinguish children devices.
 	 */
 	switch (adr) {
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 7 lines · Wentong Wu

Currently the shipped platforms use only _HID to distinguish ljca children devices. The _ADR support here is for future HW. This patch is to drop _ADR support and we can then re-introduce it (revert this patch) if future HW actually starts using _ADR to distinguish children devices.

Thanks, patch looks good to me:

Regards,

Hans

Quoted 37 lines
---
 drivers/usb/misc/usb-ljca.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/usb/misc/usb-ljca.c +2 -12
index c9decd0396d4..7f0deebebc13 100644
@@ -457,8 +457,8 @@ static void ljca_auxdev_acpi_bind(struct ljca_adapter *adap,
 				  u64 adr, u8 id)
 {
 	struct ljca_match_ids_walk_data wd = { 0 };
-	struct acpi_device *parent, *adev;
 	struct device *dev = adap->dev;
+	struct acpi_device *parent;
 	char uid[4];
 
 	parent = ACPI_COMPANION(dev);
@@ -466,17 +466,7 @@ static void ljca_auxdev_acpi_bind(struct ljca_adapter *adap,
 		return;
 
 	/*
-	 * get auxdev ACPI handle from the ACPI device directly
-	 * under the parent that matches _ADR.
-	 */
-	adev = acpi_find_child_device(parent, adr, false);
-	if (adev) {
-		ACPI_COMPANION_SET(&auxdev->dev, adev);
-		return;
-	}
-
-	/*
-	 * _ADR is a grey area in the ACPI specification, some
+	 * Currently LJCA hw doesn't use _ADR instead the shipped
 	 * platforms use _HID to distinguish children devices.
 	 */
 	switch (adr) {
Reviewed-by on v1 1/1
#2 lore raw
In reply to Wentong Wu
Quoted 5 lines · Wentong Wu

Currently the shipped platforms use only _HID to distinguish ljca children devices. The _ADR support here is for future HW. This patch is to drop _ADR support and we can then re-introduce it (revert this patch) if future HW actually starts using _ADR to distinguish children devices.

Thank you!

Signature · 2 lines
With Best Regards,
Andy Shevchenko