赞
踩
xHCI驱动在usb/host中,主要初始化xHCI。xHCI作为usb host部分的驱动。
1. xhci driver与device的匹配
usb/host/xhci-plat.c:
- static struct platform_driver usb_xhci_driver = {
- .probe = xhci_plat_probe,
- .remove = xhci_plat_remove,
- .shutdown = usb_hcd_platform_shutdown,
- .driver = {
- .name = "xhci-hcd",
- .pm = &xhci_plat_pm_ops,
- .of_match_table = of_match_ptr(usb_xhci_of_match),
- .acpi_match_table = ACPI_PTR(usb_xhci_acpi_match),
- },
- };
- MODULE_ALIAS("platform:xhci-hcd");
-
-
- static int __init xhci_plat_init(void)
- {
- xhci_init_driver(&xhci_plat_hc_driver, &xhci_plat_overrides);
- return platform_driver_register(&usb_xhci_driver);
- }
- module_init(xhci_plat_init);
从usb_xhci_driver可以看出有两种匹配方式去执行xhci_plat_probe:
1.1 driver.name
platform_driver.driver.name
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。