drivers/usb/host/ehci-pci.c

Source file repositories/reference/linux-study-clean/drivers/usb/host/ehci-pci.c

File Facts

System
Linux kernel
Corpus path
drivers/usb/host/ehci-pci.c
Extension
.c
Size
12640 bytes
Lines
447
Domain
Driver Families
Bucket
drivers/usb
Inferred role
Driver Families: operation-table or driver-model contract
Status
pattern implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

static struct pci_driver ehci_pci_driver = {
	.name =		hcd_name,
	.id_table =	pci_ids,

	.probe =	ehci_pci_probe,
	.remove =	ehci_pci_remove,
	.shutdown = 	usb_hcd_pci_shutdown,

	.driver =	{
#ifdef CONFIG_PM
		.pm =	&usb_hcd_pci_pm_ops,
#endif
		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
	},
};

static int __init ehci_pci_init(void)
{
	if (usb_disabled())
		return -ENODEV;

	ehci_init_driver(&ehci_pci_hc_driver, &pci_overrides);

	/* Entries for the PCI suspend/resume callbacks are special */
	ehci_pci_hc_driver.pci_suspend = ehci_suspend;
	ehci_pci_hc_driver.pci_resume = ehci_pci_resume;

	return pci_register_driver(&ehci_pci_driver);
}
module_init(ehci_pci_init);

static void __exit ehci_pci_cleanup(void)
{
	pci_unregister_driver(&ehci_pci_driver);
}
module_exit(ehci_pci_cleanup);

MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR("David Brownell");
MODULE_AUTHOR("Alan Stern");
MODULE_LICENSE("GPL");

Annotation

Implementation Notes