drivers/usb/gadget/function/f_sourcesink.c
Source file repositories/reference/linux-study-clean/drivers/usb/gadget/function/f_sourcesink.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/gadget/function/f_sourcesink.c- Extension
.c- Size
- 32735 bytes
- Lines
- 1341
- 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/slab.hlinux/kernel.hlinux/device.hlinux/module.hlinux/usb/composite.hlinux/usb/func_utils.hlinux/err.hg_zero.h
Detected Declarations
struct f_sourcesinkfunction disable_epfunction disable_endpointsfunction sourcesink_bindfunction sourcesink_free_funcfunction check_read_datafunction reinit_write_datafunction source_sink_completefunction source_sink_start_epfunction disable_source_sinkfunction enable_source_sinkfunction sourcesink_set_altfunction sourcesink_get_altfunction sourcesink_disablefunction sourcesink_setupfunction ss_attr_releasefunction f_ss_opts_pattern_showfunction f_ss_opts_pattern_storefunction f_ss_opts_isoc_interval_showfunction f_ss_opts_isoc_interval_storefunction f_ss_opts_isoc_maxpacket_showfunction f_ss_opts_isoc_maxpacket_storefunction f_ss_opts_isoc_mult_showfunction f_ss_opts_isoc_mult_storefunction f_ss_opts_isoc_maxburst_showfunction f_ss_opts_isoc_maxburst_storefunction f_ss_opts_bulk_maxburst_showfunction f_ss_opts_bulk_maxburst_storefunction f_ss_opts_bulk_buflen_showfunction f_ss_opts_bulk_buflen_storefunction f_ss_opts_bulk_qlen_showfunction f_ss_opts_bulk_qlen_storefunction f_ss_opts_iso_qlen_showfunction f_ss_opts_iso_qlen_storefunction source_sink_free_instancefunction sslb_modinitfunction sslb_modexitmodule init sslb_modinit
Annotated Snippet
module_init(sslb_modinit);
module_exit(sslb_modexit);
MODULE_DESCRIPTION("USB peripheral source/sink configuration driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/slab.h`, `linux/kernel.h`, `linux/device.h`, `linux/module.h`, `linux/usb/composite.h`, `linux/usb/func_utils.h`, `linux/err.h`, `g_zero.h`.
- Detected declarations: `struct f_sourcesink`, `function disable_ep`, `function disable_endpoints`, `function sourcesink_bind`, `function sourcesink_free_func`, `function check_read_data`, `function reinit_write_data`, `function source_sink_complete`, `function source_sink_start_ep`, `function disable_source_sink`.
- 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.