drivers/hid/bpf/progs/FR-TEC__Raptor-Mach-2.bpf.c
Source file repositories/reference/linux-study-clean/drivers/hid/bpf/progs/FR-TEC__Raptor-Mach-2.bpf.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/hid/bpf/progs/FR-TEC__Raptor-Mach-2.bpf.c- Extension
.c- Size
- 10468 bytes
- Lines
- 191
- 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
vmlinux.hhid_bpf.hhid_bpf_helpers.hbpf/bpf_tracing.h
Detected Declarations
function BPF_PROGfunction BPF_PROGfunction probe
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2024 Benjamin Tissoires
*/
#include "vmlinux.h"
#include "hid_bpf.h"
#include "hid_bpf_helpers.h"
#include <bpf/bpf_tracing.h>
#define VID_BETOP_2185PC 0x11C0
#define PID_RAPTOR_MACH_2 0x5606
HID_BPF_CONFIG(
HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, VID_BETOP_2185PC, PID_RAPTOR_MACH_2),
);
/*
* For reference, this is the fixed report descriptor
*
* static const __u8 fixed_rdesc[] = {
* 0x05, 0x01, // Usage Page (Generic Desktop) 0
* 0x09, 0x04, // Usage (Joystick) 2
* 0xa1, 0x01, // Collection (Application) 4
* 0x05, 0x01, // Usage Page (Generic Desktop) 6
* 0x85, 0x01, // Report ID (1) 8
* 0x05, 0x01, // Usage Page (Generic Desktop) 10
* 0x09, 0x30, // Usage (X) 12
* 0x75, 0x10, // Report Size (16) 14
* 0x95, 0x01, // Report Count (1) 16
* 0x15, 0x00, // Logical Minimum (0) 18
* 0x26, 0xff, 0x07, // Logical Maximum (2047) 20
* 0x46, 0xff, 0x07, // Physical Maximum (2047) 23
* 0x81, 0x02, // Input (Data,Var,Abs) 26
* 0x05, 0x01, // Usage Page (Generic Desktop) 28
* 0x09, 0x31, // Usage (Y) 30
* 0x75, 0x10, // Report Size (16) 32
* 0x95, 0x01, // Report Count (1) 34
* 0x15, 0x00, // Logical Minimum (0) 36
* 0x26, 0xff, 0x07, // Logical Maximum (2047) 38
* 0x46, 0xff, 0x07, // Physical Maximum (2047) 41
* 0x81, 0x02, // Input (Data,Var,Abs) 44
* 0x05, 0x01, // Usage Page (Generic Desktop) 46
* 0x09, 0x33, // Usage (Rx) 48
* 0x75, 0x10, // Report Size (16) 50
* 0x95, 0x01, // Report Count (1) 52
* 0x15, 0x00, // Logical Minimum (0) 54
* 0x26, 0xff, 0x03, // Logical Maximum (1023) 56
* 0x46, 0xff, 0x03, // Physical Maximum (1023) 59
* 0x81, 0x02, // Input (Data,Var,Abs) 62
* 0x05, 0x00, // Usage Page (Undefined) 64
* 0x09, 0x00, // Usage (Undefined) 66
* 0x75, 0x10, // Report Size (16) 68
* 0x95, 0x01, // Report Count (1) 70
* 0x15, 0x00, // Logical Minimum (0) 72
* 0x26, 0xff, 0x03, // Logical Maximum (1023) 74
* 0x46, 0xff, 0x03, // Physical Maximum (1023) 77
* 0x81, 0x02, // Input (Data,Var,Abs) 80
* 0x05, 0x01, // Usage Page (Generic Desktop) 82
* 0x09, 0x32, // Usage (Z) 84
* 0x75, 0x10, // Report Size (16) 86
* 0x95, 0x01, // Report Count (1) 88
* 0x15, 0x00, // Logical Minimum (0) 90
* 0x26, 0xff, 0x03, // Logical Maximum (1023) 92
* 0x46, 0xff, 0x03, // Physical Maximum (1023) 95
* 0x81, 0x02, // Input (Data,Var,Abs) 98
* 0x05, 0x01, // Usage Page (Generic Desktop) 100
* 0x09, 0x35, // Usage (Rz) 102
* 0x75, 0x10, // Report Size (16) 104
* 0x95, 0x01, // Report Count (1) 106
* 0x15, 0x00, // Logical Minimum (0) 108
* 0x26, 0xff, 0x03, // Logical Maximum (1023) 110
* 0x46, 0xff, 0x03, // Physical Maximum (1023) 113
* 0x81, 0x02, // Input (Data,Var,Abs) 116
* 0x05, 0x01, // Usage Page (Generic Desktop) 118
* 0x09, 0x34, // Usage (Ry) 120
* 0x75, 0x10, // Report Size (16) 122
* 0x95, 0x01, // Report Count (1) 124
* 0x15, 0x00, // Logical Minimum (0) 126
* 0x26, 0xff, 0x07, // Logical Maximum (2047) 128
* 0x46, 0xff, 0x07, // Physical Maximum (2047) 131
* 0x81, 0x02, // Input (Data,Var,Abs) 134
* 0x05, 0x01, // Usage Page (Generic Desktop) 136
* 0x09, 0x36, // Usage (Slider) 138
* 0x75, 0x10, // Report Size (16) 140
* 0x95, 0x01, // Report Count (1) 142
* 0x15, 0x00, // Logical Minimum (0) 144
* 0x26, 0xff, 0x03, // Logical Maximum (1023) 146
* 0x46, 0xff, 0x03, // Physical Maximum (1023) 149
* 0x81, 0x02, // Input (Data,Var,Abs) 152
* 0x05, 0x09, // Usage Page (Button) 154
Annotation
- Immediate include surface: `vmlinux.h`, `hid_bpf.h`, `hid_bpf_helpers.h`, `bpf/bpf_tracing.h`.
- Detected declarations: `function BPF_PROG`, `function BPF_PROG`, `function probe`.
- 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.