drivers/usb/gadget/udc/goku_udc.c
Source file repositories/reference/linux-study-clean/drivers/usb/gadget/udc/goku_udc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/gadget/udc/goku_udc.c- Extension
.c- Size
- 46364 bytes
- Lines
- 1861
- 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/ioport.hlinux/slab.hlinux/errno.hlinux/timer.hlinux/list.hlinux/interrupt.hlinux/proc_fs.hlinux/seq_file.hlinux/device.hlinux/usb/ch9.hlinux/usb/gadget.hlinux/prefetch.hasm/byteorder.hasm/io.hasm/irq.hlinux/unaligned.hgoku_udc.h
Detected Declarations
function commandfunction goku_ep_enablefunction ep_resetfunction goku_ep_disablefunction goku_alloc_requestfunction goku_free_requestfunction donefunction write_packetfunction write_fifofunction read_fifofunction pio_irq_enablefunction pio_irq_disablefunction pio_advancefunction start_dmafunction dma_advancefunction abort_dmafunction goku_queuefunction nukefunction goku_dequeuefunction goku_clear_haltfunction goku_set_haltfunction goku_fifo_statusfunction goku_fifo_flushfunction goku_get_framefunction dump_intmaskfunction udc_proc_readfunction list_for_each_entryfunction udc_reinitfunction udc_resetfunction ep0_startfunction udc_enablefunction set_configurationfunction stop_activityfunction goku_udc_stopfunction ep0_setupfunction goku_irqfunction gadget_releasefunction goku_removefunction goku_probe
Annotated Snippet
static struct pci_driver goku_pci_driver = {
.name = driver_name,
.id_table = pci_ids,
.probe = goku_probe,
.remove = goku_remove,
/* FIXME add power management support */
};
module_pci_driver(goku_pci_driver);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/pci.h`, `linux/delay.h`, `linux/ioport.h`, `linux/slab.h`, `linux/errno.h`, `linux/timer.h`.
- Detected declarations: `function command`, `function goku_ep_enable`, `function ep_reset`, `function goku_ep_disable`, `function goku_alloc_request`, `function goku_free_request`, `function done`, `function write_packet`, `function write_fifo`, `function read_fifo`.
- 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.