drivers/usb/gadget/configfs.c
Source file repositories/reference/linux-study-clean/drivers/usb/gadget/configfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/gadget/configfs.c- Extension
.c- Size
- 52601 bytes
- Lines
- 2109
- 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/configfs.hlinux/module.hlinux/slab.hlinux/device.hlinux/kstrtox.hlinux/nls.hlinux/usb/composite.hlinux/usb/func_utils.hlinux/usb/gadget_configfs.hlinux/usb/webusb.hconfigfs.hu_os_desc.h
Detected Declarations
struct gadget_infostruct config_usb_cfgstruct gadget_languagestruct gadget_config_namefunction check_user_usb_stringfunction usb_string_copyfunction is_valid_bcdfunction gadget_dev_desc_bcdDevice_storefunction gadget_dev_desc_bcdUSB_storefunction gadget_dev_desc_UDC_showfunction unregister_gadgetfunction gadget_dev_desc_UDC_storefunction gadget_dev_desc_max_speed_showfunction gadget_dev_desc_max_speed_storefunction gadget_info_attr_releasefunction gadget_config_attr_releasefunction config_usb_cfg_linkfunction list_for_each_entryfunction list_for_each_entryfunction config_usb_cfg_unlinkfunction list_for_each_entryfunction gadget_config_desc_MaxPower_showfunction gadget_config_desc_MaxPower_storefunction gadget_config_desc_bmAttributes_showfunction gadget_config_desc_bmAttributes_storefunction composite_init_devfunction function_dropfunction gadget_config_name_attr_releasefunction config_desc_dropfunction gadget_language_attr_releasefunction gadget_string_id_showfunction gadget_string_s_showfunction gadget_string_s_storefunction gadget_string_releasefunction gadget_language_string_dropfunction gadget_language_dropfunction webusb_use_showfunction webusb_use_storefunction webusb_bcdVersion_showfunction webusb_bcdVersion_storefunction webusb_bVendorCode_showfunction webusb_bVendorCode_storefunction webusb_landingPage_showfunction webusb_landingPage_storefunction os_desc_use_showfunction os_desc_use_storefunction os_desc_b_vendor_code_showfunction os_desc_b_vendor_code_store
Annotated Snippet
module_init(gadget_cfs_init);
static void __exit gadget_cfs_exit(void)
{
configfs_unregister_subsystem(&gadget_subsys);
}
module_exit(gadget_cfs_exit);
Annotation
- Immediate include surface: `linux/configfs.h`, `linux/module.h`, `linux/slab.h`, `linux/device.h`, `linux/kstrtox.h`, `linux/nls.h`, `linux/usb/composite.h`, `linux/usb/func_utils.h`.
- Detected declarations: `struct gadget_info`, `struct config_usb_cfg`, `struct gadget_language`, `struct gadget_config_name`, `function check_user_usb_string`, `function usb_string_copy`, `function is_valid_bcd`, `function gadget_dev_desc_bcdDevice_store`, `function gadget_dev_desc_bcdUSB_store`, `function gadget_dev_desc_UDC_show`.
- 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.