hid_match_usage(9)
β¨ NAME β¨
okay so bestie, this is hid_match_usage(9) from the Kernel API Manual π and it is literally here to check if driver's event should be called. no cap, that's the whole name-vibe.
π¦ SYNOPSIS π¦
int hid_match_usage (struct hid_device *hid , struct hid_usage *usage );
π ARGUMENTS π
hidβ the hid device. that's it, that's the arg π«Άusageβ the usage to match against. yes bestie, it is the usage you are matching.
π DESCRIPTION π
okay so the actual move is a lil compare. it compares hid->driver->usage_table->usage_{type,code} to usage->usage_{type,code}. that is the whole description, and honestly? iconic. the {type,code} bits are doing their little pair thing, and the function is checking them against each other. periodt. π
π SEE ALSO π
the whole squad, bestie:
- Kernel file
./drivers/hid/hid-core.c hid_parse_report(9)hid_validate_values(9)hid_open_report(9)hid_match_report(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)
xoxo, your kernel bestie π source/version: ./drivers/hid; date: October 2026; page: hid_match_usage(9) π«Άβ¨
π¦ 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