drivers/usb/gadget/udc/pch_udc.c
Source file repositories/reference/linux-study-clean/drivers/usb/gadget/udc/pch_udc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/gadget/udc/pch_udc.c- Extension
.c- Size
- 88067 bytes
- Lines
- 3163
- 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.
- 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/pci.hlinux/delay.hlinux/errno.hlinux/gpio/consumer.hlinux/gpio/machine.hlinux/list.hlinux/interrupt.hlinux/usb/ch9.hlinux/usb/gadget.hlinux/irq.h
Detected Declarations
struct pch_udc_data_dma_descstruct pch_udc_stp_dma_descstruct pch_udc_cfg_datastruct pch_udc_epstruct pch_vbus_gpio_datastruct pch_udc_devstruct pch_udc_requestfunction pch_udc_readlfunction pch_udc_writelfunction pch_udc_bit_setfunction pch_udc_bit_clrfunction pch_udc_ep_readlfunction pch_udc_ep_writelfunction pch_udc_ep_bit_setfunction pch_udc_ep_bit_clrfunction pch_udc_csr_busyfunction pch_udc_write_csrfunction pch_udc_read_csrfunction pch_udc_rmt_wakeupfunction pch_udc_get_framefunction pch_udc_clear_selfpoweredfunction pch_udc_set_selfpoweredfunction pch_udc_set_disconnectfunction pch_udc_clear_disconnectfunction pch_udc_reconnectfunction pch_udc_vbus_sessionfunction pch_udc_ep_set_stallfunction pch_udc_ep_clear_stallfunction pch_udc_ep_set_trfr_typefunction pch_udc_ep_set_bufszfunction pch_udc_ep_set_maxpktfunction pch_udc_ep_set_subptrfunction pch_udc_ep_set_ddptrfunction pch_udc_ep_set_pdfunction pch_udc_ep_set_rrdyfunction pch_udc_ep_clear_rrdyfunction pch_udc_set_dmafunction pch_udc_clear_dmafunction pch_udc_set_csr_donefunction pch_udc_disable_interruptsfunction pch_udc_enable_interruptsfunction pch_udc_disable_ep_interruptsfunction pch_udc_enable_ep_interruptsfunction pch_udc_read_device_interruptsfunction pch_udc_write_device_interruptsfunction pch_udc_read_ep_interruptsfunction pch_udc_write_ep_interruptsfunction pch_udc_read_device_status
Annotated Snippet
static struct pci_driver pch_udc_driver = {
.name = KBUILD_MODNAME,
.id_table = pch_udc_pcidev_id,
.probe = pch_udc_probe,
.remove = pch_udc_remove,
.shutdown = pch_udc_shutdown,
.driver = {
.pm = &pch_udc_pm,
},
};
module_pci_driver(pch_udc_driver);
MODULE_DESCRIPTION("Intel EG20T USB Device Controller");
MODULE_AUTHOR("LAPIS Semiconductor, <tomoya-linux@dsn.lapis-semi.com>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/pci.h`, `linux/delay.h`, `linux/errno.h`, `linux/gpio/consumer.h`, `linux/gpio/machine.h`, `linux/list.h`.
- Detected declarations: `struct pch_udc_data_dma_desc`, `struct pch_udc_stp_dma_desc`, `struct pch_udc_cfg_data`, `struct pch_udc_ep`, `struct pch_vbus_gpio_data`, `struct pch_udc_dev`, `struct pch_udc_request`, `function pch_udc_readl`, `function pch_udc_writel`, `function pch_udc_bit_set`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.