drivers/usb/host/ohci-pci.c

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

File Facts

System
Linux kernel
Corpus path
drivers/usb/host/ohci-pci.c
Extension
.c
Size
9061 bytes
Lines
359
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 ohci_pci_driver = {
	.name =		hcd_name,
	.id_table =	pci_ids,

	.probe =	ohci_pci_probe,
	.remove =	usb_hcd_pci_remove,
	.shutdown =	usb_hcd_pci_shutdown,

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

#ifdef CONFIG_PM
static int ohci_pci_resume(struct usb_hcd *hcd, pm_message_t msg)
{
	return ohci_resume(hcd, msg.event == PM_EVENT_RESTORE);
}
#endif
static int __init ohci_pci_init(void)
{
	if (usb_disabled())
		return -ENODEV;

	ohci_init_driver(&ohci_pci_hc_driver, &pci_overrides);

#ifdef	CONFIG_PM
	/* Entries for the PCI suspend/resume callbacks are special */
	ohci_pci_hc_driver.pci_suspend = ohci_suspend;
	ohci_pci_hc_driver.pci_resume = ohci_pci_resume;
#endif

	return pci_register_driver(&ohci_pci_driver);
}
module_init(ohci_pci_init);

static void __exit ohci_pci_cleanup(void)
{
	pci_unregister_driver(&ohci_pci_driver);
}
module_exit(ohci_pci_cleanup);

MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
MODULE_SOFTDEP("pre: ehci_pci");

Annotation

Implementation Notes