STRUCT HID_SENSOR_HUB_CALLBACKS(9)
π struct hid_sensor_hub_callbacks(9) β Kernel API Manual π
okay bestie, welcome to the Kernel API Manual for struct hid_sensor_hub_callbacks(9) β literally the group chat of client callback functions, and everyone's invited π
β¨ NAME β¨
struct hid_sensor_hub_callbacks β Client callback functions π«Ά
like, these are the functions your client driver hands over so the sensor hub can hit it up later. no cap.
π SYNOPSIS π
struct hid_sensor_hub_callbacks {
struct platform_device *pdev;
int (*suspend)(struct hid_sensor_hub_device *hsdev, void *priv);
int (*resume)(struct hid_sensor_hub_device *hsdev, void *priv);
int (*capture_sample)(struct hid_sensor_hub_device *hsdev, u32 usage_id, size_t raw_len, char *raw_data, void *priv);
int (*send_event)(struct hid_sensor_hub_device *hsdev, u32 usage_id, void *priv);
};
she's giving struct, she's giving function pointers, she's giving main character energy π
π¦ Members π¦
pdevβ Platform device instance of the client driver. that's her home base, her little anchor to reality πsuspendβ Suspend callback. gets called when things go sleepy bye π΄resumeβ Resume callback. and this one's the wake-up call, rise and shine βοΈcapture_sampleβ Callback to get a sample. literally "gimme a data sample" energy πsend_eventβ Send notification to indicate all samples are captured, process and send event. the whole "okay we got everything, now go process and send the event" moment β iconic, honestly π₯
lowkey everything here is just function pointers waiting for their moment. respect the pointer, bestie π
π SEE ALSO π
Kernel file ./include/linux/hid-sensor-hub.h β¨ plus her whole friend group:
struct hid_sensor_hub_attribute_info(9)struct sensor_hub_pending(9)struct hid_sensor_hub_device(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)
okay that's the whole page, no notes π this came out of ./include/linux, dated October 2026, and she answers to the name struct hid_...ub_callbacks(9). 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