当前位置:   article > 正文

USB3.0 host xHCI驱动

xhci驱动

xHCI驱动在usb/host中,主要初始化xHCI。xHCI作为usb host部分的驱动。

1. xhci driver与device的匹配

usb/host/xhci-plat.c:

  1. static struct platform_driver usb_xhci_driver = {
  2. .probe = xhci_plat_probe,
  3. .remove = xhci_plat_remove,
  4. .shutdown = usb_hcd_platform_shutdown,
  5. .driver = {
  6. .name = "xhci-hcd",
  7. .pm = &xhci_plat_pm_ops,
  8. .of_match_table = of_match_ptr(usb_xhci_of_match),
  9. .acpi_match_table = ACPI_PTR(usb_xhci_acpi_match),
  10. },
  11. };
  12. MODULE_ALIAS("platform:xhci-hcd");
  13. static int __init xhci_plat_init(void)
  14. {
  15. xhci_init_driver(&xhci_plat_hc_driver, &xhci_plat_overrides);
  16. return platform_driver_register(&usb_xhci_driver);
  17. }
  18. module_init(xhci_plat_init);

从usb_xhci_driver可以看出有两种匹配方式去执行xhci_plat_probe:

1.1 driver.name

platform_driver.driver.name

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/247132
推荐阅读
相关标签
  

闽ICP备14008679号