Skip to contentSkip to conversation

usb: dwc3: Add ACPI support for xHCI ports

PATCH Applied Andy Shevchenko 2 participants 4 messages Feb 18, 2020 – Mar 15, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 usb: dwc3: Add ACPI support for xHCI ports

The ACPI companion of the adapter has to be set for xHCI controller code to read and attach the ports described in the ACPI table. Use ACPI_COMPANION_SET macro to set this.

---
v2: split out kernel doc fix

 drivers/usb/dwc3/host.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/dwc3/host.c +2 -0
index fa252870c926..95a90ea08975 100644
@@ -7,6 +7,7 @@
  * Authors: Felipe Balbi <[email protected]>,
  */
 
+#include <linux/acpi.h>
 #include <linux/platform_device.h>
 
 #include "core.h"
@@ -75,6 +76,7 @@ int dwc3_host_init(struct dwc3 *dwc)
 	}
 
 	xhci->dev.parent	= dwc->dev;
+	ACPI_COMPANION_SET(&xhci->dev, ACPI_COMPANION(dwc->dev));
 
 	dwc->xhci = xhci;
 
Signature · 1 line
2.25.0
#1 lore raw

PATCH v2 2/2 usb: dwc3: Remove kernel doc annotation where it's not needed

The main comment in the file mistakenly marked with kernel doc annotation which makes the parser unhappy:

.../dwc3/host.c:16: warning: Function parameter or member 'dwc' not described in 'dwc3_host_get_irq'

Drop kernel doc annotation from host.c module.

---
v2: new patch (Felipe)

 drivers/usb/dwc3/host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/host.c +1 -1
index 95a90ea08975..86dbd012b984 100644
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*
  * host.c - DesignWare USB3 DRD Controller Host Glue
  *
  * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com
Signature · 1 line
2.25.0
#2 lore raw
In reply to Andy Shevchenko
Quoted 3 lines · Andy Shevchenko

The ACPI companion of the adapter has to be set for xHCI controller code to read and attach the ports described in the ACPI table. Use ACPI_COMPANION_SET macro to set this.

Felipe, do you have any comments on this?

Quoted 30 lines

---
v2: split out kernel doc fix

 drivers/usb/dwc3/host.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/dwc3/host.c +2 -0
index fa252870c926..95a90ea08975 100644
@@ -7,6 +7,7 @@
  * Authors: Felipe Balbi <[email protected]>,
  */
 
+#include <linux/acpi.h>
 #include <linux/platform_device.h>
 
 #include "core.h"
@@ -75,6 +76,7 @@ int dwc3_host_init(struct dwc3 *dwc)
 	}
 
 	xhci->dev.parent	= dwc->dev;
+	ACPI_COMPANION_SET(&xhci->dev, ACPI_COMPANION(dwc->dev));
 
 	dwc->xhci = xhci;
 
Signature · 1 line
2.25.0
Signature · 2 lines
With Best Regards,
Andy Shevchenko
Applied
#3 lore raw
Quoted 6 lines · Andy Shevchenko
Quoted 3 lines · Andy Shevchenko

The ACPI companion of the adapter has to be set for xHCI controller code to read and attach the ports described in the ACPI table. Use ACPI_COMPANION_SET macro to set this.

Felipe, do you have any comments on this?

applied

Signature · 1 line
balbi