drivers/usb/common/common.c
Source file repositories/reference/linux-study-clean/drivers/usb/common/common.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/common/common.c- Extension
.c- Size
- 12783 bytes
- Lines
- 453
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/usb/ch9.hlinux/usb/of.hlinux/usb/otg.hlinux/of_platform.hlinux/debugfs.hcommon.h
Detected Declarations
function usb_ep_type_stringfunction usb_otg_state_stringfunction usb_speed_stringfunction usb_get_maximum_speedfunction usb_get_maximum_ssp_ratefunction usb_get_dr_mode_from_stringfunction usb_get_dr_modefunction usb_get_role_switch_default_modefunction usb_decode_intervalfunction of_usb_get_dr_mode_by_phyfunction for_each_node_with_propertyfunction hostsfunction of_usb_update_otg_capsfunction usb_common_initfunction usb_common_exitmodule init usb_common_initexport usb_ep_type_stringexport usb_otg_state_stringexport usb_speed_stringexport usb_get_maximum_speedexport usb_get_maximum_ssp_rateexport usb_state_stringexport usb_get_dr_modeexport usb_get_role_switch_default_modeexport usb_decode_intervalexport of_usb_get_dr_mode_by_phyexport of_usb_host_tpl_supportexport of_usb_update_otg_capsexport usb_of_get_companion_devexport usb_debug_rootexport usb_dynids_lock
Annotated Snippet
subsys_initcall(usb_common_init);
module_exit(usb_common_exit);
MODULE_DESCRIPTION("Common code for host and device side USB");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/of.h`, `linux/platform_device.h`, `linux/usb/ch9.h`, `linux/usb/of.h`, `linux/usb/otg.h`, `linux/of_platform.h`.
- Detected declarations: `function usb_ep_type_string`, `function usb_otg_state_string`, `function usb_speed_string`, `function usb_get_maximum_speed`, `function usb_get_maximum_ssp_rate`, `function usb_get_dr_mode_from_string`, `function usb_get_dr_mode`, `function usb_get_role_switch_default_mode`, `function usb_decode_interval`, `function of_usb_get_dr_mode_by_phy`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: integration implementation candidate.
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.