STRUCT HID_SENSOR_HUB_CALLBACKS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ 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:

  1. struct hid_sensor_hub_attribute_info(9)
  2. struct sensor_hub_pending(9)
  3. struct hid_sensor_hub_device(9)
  4. sensor_hub_device_open(9)
  5. sensor_hub_device_close(9)
  6. sensor_hub_register_callback(9)
  7. sensor_hub_remove_callback(9)
  8. sensor_hub_input_get_attribute_info(9)
  9. sensor_hub_input_attr_read_values(9)
  10. sensor_hub_set_feature(9)
  11. 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