STRUCT HID_LL_DRIVER(9)
π struct hid_ll_driver(9) π
okay bestie, welcome to the Kernel API Manual, section 9, main character energy only β¨. This page is about struct hid_ll_driver β literally the low level driver callbacks, no cap. If you're working on the low-level side of HID, this struct is basically the group chat of callbacks, and every member has a job. iykyk π
πΈ NAME πΈ
struct hid_ll_driver β low level driver callbacks. That's the whole name, bestie: the low-level callback squad for HID drivers. Slay. π
β¨ SYNOPSIS β¨
lowkey here's the exact shape of the struct, fr fr β don't let the function-pointer syntax jump-scare you π«Ά:
struct hid_ll_driver {
int (*start)(struct hid_device *hdev);
void (*stop)(struct hid_device *hdev);
int (*open)(struct hid_device *hdev);
void (*close)(struct hid_device *hdev);
int (*power)(struct hid_device *hdev, int level);
int (*parse)(struct hid_device *hdev);
void (*request)(struct hid_device *hdev, struct hid_report *report,
int reqtype);
int (*wait)(struct hid_device *hdev);
int (*raw_request) (struct hid_device *hdev, unsigned char
reportnum, __u8 *buf, size_t len, unsigned char rtype, int reqtype);
int (*output_report) (struct hid_device *hdev, __u8 *buf, size_t
len);
int (*idle)(struct hid_device *hdev, int report, int idle, int
reqtype);
bool (*may_wakeup)(struct hid_device *hdev);
unsigned int max_buffer_size;
};
π Members π
here's the roster, one by one β no member left behind π«Ά:
startβ called on probe to start the device. πstopβ called on remove. π«Άopenβ called by input layer on open. β¨closeβ called by input layer on close. πpowerβ request underlying hardware to enter requested power mode. πparseβ this method is called only once to parse the device data, shouldn't allocate anything to not leak memory. β οΈ seriously, bestie: don't leak memory β that's not the vibe.requestβ send report request to device (e.g. feature report). π¨waitβ wait for buffered io to complete (send/recv reports). β³raw_requestβ send raw report request to device (e.g. feature report). π§output_reportβ send output report to device. π€idleβ send idle request to device. π€may_wakeupβ return if device may act as a wakeup source during system-suspend. πmax_buffer_sizeβ over-ride maximum data buffer size (default:HID_MAX_BUFFER_SIZE). π¦
π SEE ALSO π
vibe check these next, bestie β the whole HID friend group is here π:
- Kernel file
./include/linux/hid.hβ home base π HID quirks(9)struct hid_battery(9)struct hid_driver(9)module_hid_driver(9)hid_device_io_start(9)hid_device_io_stop(9)hid_map_usage(9)hid_map_usage_clear(9)hid_parse(9)hid_hw_power(9)hid_hw_idle(9)hid_hw_may_wakeup(9)hid_hw_wait(9)hid_report_len(9)
mwah π source/version: ./include/linux; date: October 2026. That's the footer energy, bestie β now go make those callbacks iconic. π«Άβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms