STRUCT HID_LL_DRIVER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌟 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 😭:


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