drivers/usb/gadget/udc/dummy_hcd.c
Source file repositories/reference/linux-study-clean/drivers/usb/gadget/udc/dummy_hcd.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/gadget/udc/dummy_hcd.c- Extension
.c- Size
- 75255 bytes
- Lines
- 2940
- Domain
- Driver Families
- Bucket
- drivers/usb
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/module.hlinux/kernel.hlinux/delay.hlinux/ioport.hlinux/slab.hlinux/string_choices.hlinux/errno.hlinux/init.hlinux/hrtimer.hlinux/list.hlinux/interrupt.hlinux/platform_device.hlinux/usb.hlinux/usb/gadget.hlinux/usb/hcd.hlinux/scatterlist.hasm/byteorder.hlinux/io.hasm/irq.hlinux/unaligned.h
Detected Declarations
struct dummy_hcd_module_parametersstruct dummy_epstruct dummy_requeststruct urbpstruct dummy_hcdstruct dummyenum dummy_rh_statefunction nukefunction stop_activityfunction set_link_state_by_speedfunction set_link_statefunction somefunction dummy_disablefunction dummy_free_requestfunction fifo_completefunction list_emptyfunction dummy_dequeuefunction dummy_set_halt_and_wedgefunction dummy_set_haltfunction dummy_set_wedgefunction dummy_g_get_framefunction dummy_wakeupfunction dummy_set_selfpoweredfunction dummy_udc_update_ep0function dummy_pullupfunction dummy_udc_set_speedfunction dummy_udc_async_callbacksfunction synchronize_irqfunction function_showfunction devicefunction dummy_udc_stopfunction init_dummy_udc_hwfunction dummy_udc_probefunction dummy_udc_removefunction dummy_udc_pmfunction dummy_udc_suspendfunction dummy_udc_resumefunction dummy_get_ep_idxfunction dummy_ep_stream_enfunction get_max_streams_for_pipefunction set_max_streams_for_pipefunction dummy_validate_streamfunction dummy_urb_enqueuefunction dummy_urb_dequeuefunction dummy_perform_transferfunction transferfunction periodic_bytesfunction handle_control_request
Annotated Snippet
module_init(dummy_hcd_init);
static void __exit dummy_hcd_cleanup(void)
{
int i;
for (i = 0; i < mod_data.num; i++) {
struct dummy *dum;
dum = *((void **)dev_get_platdata(&the_udc_pdev[i]->dev));
platform_device_unregister(the_udc_pdev[i]);
platform_device_unregister(the_hcd_pdev[i]);
kfree(dum);
}
platform_driver_unregister(&dummy_udc_driver);
platform_driver_unregister(&dummy_hcd_driver);
}
module_exit(dummy_hcd_cleanup);
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/delay.h`, `linux/ioport.h`, `linux/slab.h`, `linux/string_choices.h`, `linux/errno.h`, `linux/init.h`.
- Detected declarations: `struct dummy_hcd_module_parameters`, `struct dummy_ep`, `struct dummy_request`, `struct urbp`, `struct dummy_hcd`, `struct dummy`, `enum dummy_rh_state`, `function nuke`, `function stop_activity`, `function set_link_state_by_speed`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.