STRUCT HID_SENSOR_HUB_DEVICE(9)
β¨ struct hid_sensor_hub_device(9) β¨
okay so bestie, this is a page from the Kernel API Manual β yes, the kernel manual, we're doing this, we're built different π
β and it's all about struct hid_sensor_hub_device, which is literally the place where the hub instance data lives. like, that's its whole job. storing the hub instance data. iconic behavior honestly π
πΈ NAME πΈ
struct hid_sensor_hub_device β stores the hub instance data π«Ά
π¦ SYNOPSIS π¦
okay so here's the whole struct, laid out for you, no cap, character for character:
struct hid_sensor_hub_device {
struct hid_device *hdev;
u32 vendor_id;
u32 product_id;
u32 usage;
int start_collection_index;
int end_collection_index;
struct mutex *mutex_ptr;
struct sensor_hub_pending pending;
};
look at her. gorgeous. every field accounted for π
π§ Members π§
let's do a little vibe check on each field, one by one, because they all matter:
hdevβ stores the hid instance. that's it, that's the whole thing πvendor_idβ the vendor id of the hub device. who made it, basically π·οΈproduct_idβ the product id of the hub device. which one it is πusageβ the usage id for this hub device instance. iykyk β¨start_collection_indexβ the starting index for a phy type collection. where the collection begins, bestie πend_collection_indexβ the last index for a phy type collection. where it wraps up, periodt πmutex_ptrβ synchronizing mutex pointer. yes, a pointer to the mutex, not the mutex itself. we love a pointer to a lock πpendingβ holds information of the pending sync read request. the "wait, we're still waiting on that" info π
π₯ SEE ALSO π₯
- Kernel file
./include/linux/hid-sensor-hub.hstructhid_sensor_hub_attribute_info(9),struct sensor_hub_pending(9),struct hid_sensor_hub_callbacks(9),sensor_hub_device_open(9),sensor_hub_device_close(9),sensor_hub_register_callback(9),sensor_hub_remove_callback(9),sensor_hub_input_get_attribute_info(9),sensor_hub_input_attr_read_values(9),sensor_hub_set_feature(9),sensor_hub_get_feature(9)
like, go read all of those too, they're all in the family, it's giving found family energy fr fr π
quick reminder bestie: this page lives at ./include/linux and it's dated October 2026 β that's the source, the version vibe, and the date all in one π
k byeeee, go read your structs, mwah ππ¦β¨
π¦ 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