drivers/hid/hid-google-hammer.c
Source file repositories/reference/linux-study-clean/drivers/hid/hid-google-hammer.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hid/hid-google-hammer.c- Extension
.c- Size
- 15678 bytes
- Lines
- 623
- 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/acpi.hlinux/hid.hlinux/input/vivaldi-fmap.hlinux/leds.hlinux/module.hlinux/of.hlinux/platform_data/cros_ec_commands.hlinux/platform_data/cros_ec_proto.hlinux/platform_device.hlinux/unaligned.hhid-ids.hhid-vivaldi-common.h
Detected Declarations
struct cbas_ecstruct hammer_kbd_ledsfunction cbas_parse_base_statefunction cbas_ec_query_basefunction cbas_ec_notifyfunction cbas_ec_resumefunction hammer_eventfunction cbas_ec_set_inputfunction __cbas_ec_probefunction cbas_ec_probefunction cbas_ec_removefunction hammer_kbd_brightness_set_blockingfunction hammer_register_ledsfunction hammer_input_mappingfunction hammer_folded_eventfunction hammer_eventfunction hammer_has_folded_eventfunction hammer_has_backlight_controlfunction hammer_get_folded_statefunction hammer_stopfunction hammer_probefunction hammer_removefunction hammer_initfunction hammer_exitmodule init hammer_init
Annotated Snippet
module_init(hammer_init);
static void __exit hammer_exit(void)
{
hid_unregister_driver(&hammer_driver);
platform_driver_unregister(&cbas_ec_driver);
}
module_exit(hammer_exit);
MODULE_DESCRIPTION("HID driver for Google Hammer device.");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/hid.h`, `linux/input/vivaldi-fmap.h`, `linux/leds.h`, `linux/module.h`, `linux/of.h`, `linux/platform_data/cros_ec_commands.h`, `linux/platform_data/cros_ec_proto.h`.
- Detected declarations: `struct cbas_ec`, `struct hammer_kbd_leds`, `function cbas_parse_base_state`, `function cbas_ec_query_base`, `function cbas_ec_notify`, `function cbas_ec_resume`, `function hammer_event`, `function cbas_ec_set_input`, `function __cbas_ec_probe`, `function cbas_ec_probe`.
- 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.