drivers/hid/hid-xinmo.c
Source file repositories/reference/linux-study-clean/drivers/hid/hid-xinmo.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hid/hid-xinmo.c- Extension
.c- Size
- 1448 bytes
- Lines
- 61
- Domain
- Driver Families
- Bucket
- drivers/hid
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/hid.hlinux/module.hlinux/kernel.hhid-ids.h
Detected Declarations
function values
Annotated Snippet
if (value < -1) {
input_event(field->hidinput->input, usage->type,
usage->code, -1);
return 1;
}
break;
}
return 0;
}
static const struct hid_device_id xinmo_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_XIN_MO_DUAL_ARCADE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_XIN_MO, USB_DEVICE_ID_THT_2P_ARCADE) },
{ }
};
MODULE_DEVICE_TABLE(hid, xinmo_devices);
static struct hid_driver xinmo_driver = {
.name = "xinmo",
.id_table = xinmo_devices,
.event = xinmo_event
};
module_hid_driver(xinmo_driver);
MODULE_DESCRIPTION("HID driver for Xin-Mo devices");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/device.h`, `linux/hid.h`, `linux/module.h`, `linux/kernel.h`, `hid-ids.h`.
- Detected declarations: `function values`.
- Atlas domain: Driver Families / drivers/hid.
- Implementation status: source 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.