hid_validate_values(9)
π hid_validate_values β no cap, it validates ur value indexes π
okay so bestie, we're deep in the Kernel API Manual today (yes, the kernel, we're built different) and this little function is the vibe check for HID reports. let's get into it π«Ά
β¨ NAME β¨
hid_validate_values β validates the value indexes of a report that already exists on the device. that's it, that's the whole gig π
πΈ SYNOPSIS πΈ
struct hid_report * hid_validate_values (struct hid_device *hid , enum hid_report_type type , unsigned int id , unsigned int field_index , unsigned int report_counts );
like, look at all those args. she's thorough. we respect it π
π ARGUMENTS π
hidβ the hid device itself, the main character of this whole situation πtypeβ which report type we're examining. pick one, bestie, you gotta know what you're looking at π¦idβ which report ID to examine.0means the first one, casual, lowkey the default move β¨field_indexβ which report field to examine. yes, you have to say which field. no, you can't just wave vaguely at the report πΈreport_countsβ the expected number of values. i.e. what you think the count should be, and this function will fr fr check it for you π§
π DESCRIPTION π
so what does she actually do? she validates the number of values in a given field of a given report β and this happens after parsing, which is the key detail here, don't skip it π
that's the whole description. she's not complicated, she's just reliable. iconic behavior, honestly π
π₯ SEE ALSO π₯
the whole friend group, in order, don't forget any of them π«Ά:
- Kernel file
./drivers/hid/hid-core.c hid_parse_report(9)hid_open_report(9)hid_match_report(9)hid_match_usage(9)hid_input_report(9)hid_safe_input_report(9)hid_hw_start(9)hid_hw_stop(9)hid_hw_open(9)hid_hw_close(9)hid_hw_request(9)hid_hw_raw_request(9)hid_hw_output_report(9)new_id_store(9)hid_compare_device_paths(9)hid_allocate_device(9)hid_destroy_device(9)
bestie reminder: everything above is exactly what the page says β i'm not out here inventing lore. check the links, they're all there, no gatekeeping π
β and that's the page!! brought to you by the fine folks at ./drivers/hid, dated October 2026 β mwah, love u, go validate some values π
ππ
π¦ 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