drivers/hid/usbhid/hid-core.c
Source file repositories/reference/linux-study-clean/drivers/hid/usbhid/hid-core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hid/usbhid/hid-core.c- Extension
.c- Size
- 47358 bytes
- Lines
- 1738
- Domain
- Driver Families
- Bucket
- drivers/hid
- 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/slab.hlinux/init.hlinux/kernel.hlinux/list.hlinux/mm.hlinux/mutex.hlinux/property.hlinux/spinlock.hlinux/unaligned.hasm/byteorder.hlinux/input.hlinux/wait.hlinux/workqueue.hlinux/string.hlinux/seq_buf.hlinux/usb.hlinux/hid.hlinux/hiddev.hlinux/hid-debug.hlinux/hidraw.husbhid.hhid-pidff.h
Detected Declarations
function hid_start_infunction hid_retry_timeoutfunction hid_resetfunction hid_io_errorfunction usbhid_mark_busyfunction usbhid_restart_out_queuefunction usbhid_restart_ctrl_queuefunction hid_irq_infunction hid_submit_outfunction hid_submit_ctrlfunction hid_irq_outfunction hid_ctrlfunction __usbhid_submit_reportfunction usbhid_submit_reportfunction usbhid_wait_iofunction hid_set_idlefunction hid_get_class_descriptorfunction usbhid_openfunction usbhid_closefunction usbhid_init_reportsfunction hid_find_field_earlyfunction list_for_each_entryfunction usbhid_set_ledsfunction hid_find_max_reportfunction list_for_each_entryfunction hid_alloc_buffersfunction usbhid_get_raw_reportfunction usbhid_set_raw_reportfunction usbhid_output_reportfunction hid_free_buffersfunction usbhid_parsefunction usbhid_startfunction usbhid_stopfunction usbhid_powerfunction usbhid_requestfunction usbhid_raw_requestfunction usbhid_idlefunction usbhid_may_wakeupfunction hid_is_usbfunction usbhid_probefunction usbhid_disconnectfunction hid_cancel_delayed_stufffunction hid_cease_iofunction hid_restart_iofunction hid_pre_resetfunction hid_post_resetfunction hid_resume_commonfunction hid_suspend
Annotated Snippet
module_init(hid_init);
module_exit(hid_exit);
MODULE_AUTHOR("Andreas Gal");
MODULE_AUTHOR("Vojtech Pavlik");
MODULE_AUTHOR("Jiri Kosina");
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/slab.h`, `linux/init.h`, `linux/kernel.h`, `linux/list.h`, `linux/mm.h`, `linux/mutex.h`, `linux/property.h`.
- Detected declarations: `function hid_start_in`, `function hid_retry_timeout`, `function hid_reset`, `function hid_io_error`, `function usbhid_mark_busy`, `function usbhid_restart_out_queue`, `function usbhid_restart_ctrl_queue`, `function hid_irq_in`, `function hid_submit_out`, `function hid_submit_ctrl`.
- Atlas domain: Driver Families / drivers/hid.
- 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.