Skip to content

Commit 579085b

Browse files
dhdanggregkh
authored andcommitted
usb: Add support for ACPI identification to xhci-platform
Provide the methods to let ACPI identify the need to use xhci-platform. Change the Kconfig files so the xhci-plat.o file is selectable during kernel config. This has been tested on an ARM64 machine with platform XHCI, an x86_64 machine with XHCI, and an x86_64 machine without XHCI. There were no regressions or error messages on the machines without platform XHCI. [dhdang: regenerate the patch over v4.3-rc1 and address new comments] Signed-off-by: Mark Langsdorf <[email protected]> Signed-off-by: Duc Dang <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0ebbe39 commit 579085b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/usb/host/xhci-plat.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/usb/phy.h>
2020
#include <linux/slab.h>
2121
#include <linux/usb/xhci_pdriver.h>
22+
#include <linux/acpi.h>
2223

2324
#include "xhci.h"
2425
#include "xhci-mvebu.h"
@@ -268,13 +269,21 @@ static const struct of_device_id usb_xhci_of_match[] = {
268269
MODULE_DEVICE_TABLE(of, usb_xhci_of_match);
269270
#endif
270271

272+
static const struct acpi_device_id usb_xhci_acpi_match[] = {
273+
/* XHCI-compliant USB Controller */
274+
{ "PNP0D10", },
275+
{ }
276+
};
277+
MODULE_DEVICE_TABLE(acpi, usb_xhci_acpi_match);
278+
271279
static struct platform_driver usb_xhci_driver = {
272280
.probe = xhci_plat_probe,
273281
.remove = xhci_plat_remove,
274282
.driver = {
275283
.name = "xhci-hcd",
276284
.pm = DEV_PM_OPS,
277285
.of_match_table = of_match_ptr(usb_xhci_of_match),
286+
.acpi_match_table = ACPI_PTR(usb_xhci_acpi_match),
278287
},
279288
};
280289
MODULE_ALIAS("platform:xhci-hcd");

0 commit comments

Comments
 (0)