Skip to contentSkip to conversation

usb: dwc3: Add ACPI support for xHCI ports

PATCH Superseded Andy Shevchenko 2 participants 3 messages Feb 18, 2020

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/usb/dwc3/host.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/dwc3/host.c +3 -1
index fa252870c926..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
@@ -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

Hi,

Quoted 14 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.

---
 drivers/usb/dwc3/host.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/dwc3/host.c +0 -0
index fa252870c926..86dbd012b984 100644

drivers/usb/dwc3/host.c line 2

Quoted 3 lines
drivers/usb/dwc3/host.c +1 -1
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
-/**
+/*

trailing change, at least mention it in commit log ;-)

Signature · 1 line
balbi
#2 lore raw
Quoted 6 lines · Felipe Balbi

drivers/usb/dwc3/host.c line 2

Quoted 2 lines · Andy Shevchenko
drivers/usb/dwc3/host.c +1 -1
-/**
+/*

trailing change, at least mention it in commit log ;-)

I will split to two. Thanks!

Signature · 2 lines
With Best Regards,
Andy Shevchenko