hid_hw_raw_request(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hid_hw_raw_request(9) πŸ’…

okay so bestie, welcome to the kernel API manual (yes, that manual) β€” today's main character is hid_hw_raw_request, and honestly? she serves. let's get into it 🫢


✨ NAME ✨

hid_hw_raw_request β€” send a report request to the device. that's it, that's the vibe. πŸ“¨


🌸 SYNOPSIS 🌸

int hid_hw_raw_request (struct hid_device *hdev , unsigned char
reportnum , __u8 *buf , size_t len , enum hid_report_type rtype , enum
hid_class_request reqtype );

like yes, it's a lot of parameters, but we don't gatekeep function signatures here πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • hdev β€” the hid device. your fave. the one you're talking to πŸ’–
  • reportnum β€” report ID. gotta know which report you're sliding into ✨
  • buf β€” the in/out data to transfer. in and out, she's versatile like that πŸ¦‹
  • len β€” length of buf. keep it accurate or it's giving chaos 😭
  • rtype β€” HID report type. the type of report, iykyk 🌈
  • reqtype β€” either HID_REQ_GET_REPORT or HID_REQ_SET_REPORT. pick one, bestie β€” get it or set it πŸ”₯

πŸ‘‘ RETURN πŸ‘‘

count of data transferred πŸ’« β€” and if something went wrong? negative. yes, negative. not me crying over an error code 😭


πŸ’€ DESCRIPTION πŸ’€

Same behavior as hid_hw_request, but with raw buffers instead.

that's the whole thing. same energy, raw buffers. she said "I'm my sister but unprocessed" and honestly? iconic 🧚


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/hid/hid-core.c β€” and the whole friend group:

literally the entire squad, go read them all, no cap πŸ“šβœ¨


mwah πŸ’‹ this page lives in ./drivers/hid, dated October 2026, and yes the version tag matches the manual name hid_hw_raw_request(9) because she's consistent like that. periodt. πŸŽ€

πŸ“¦ where this page comes from