STRUCT SCMI_SENSOR_PROTO_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct scmi_sensor_proto_ops β€” the Kernel API Manual, bestie edition

okay so picture this: it's the Kernel API Manual (yes, that one), and this page is literally all about struct scmi_sensor_proto_ops β€” the lil' bundle that represents the various operations provided by SCMI Sensor Protocol. that's it, that's the whole assignment. no cap. πŸŽ€


✨ SYNOPSIS ✨

struct scmi_sensor_proto_ops {
    int (*count_get)(const struct scmi_protocol_handle *ph);
    const struct scmi_sensor_info __must_check *(*info_get) (const struct scmi_protocol_handle *ph, u32 sensor_id);
    int (*trip_point_config)(const struct scmi_protocol_handle *ph, u32 sensor_id, u8 trip_id, u64 trip_value);
    int (*reading_get)(const struct scmi_protocol_handle *ph, u32 sensor_id, u64 *value);
    int (*reading_get_timestamped)(const struct scmi_protocol_handle *ph, u32 sensor_id, u8 count, struct scmi_sensor_reading *readings);
    int (*config_get)(const struct scmi_protocol_handle *ph, u32 sensor_id, u32 *sensor_config);
    int (*config_set)(const struct scmi_protocol_handle *ph, u32 sensor_id, u32 sensor_config);
};

like, every single function pointer lives in here. she's a full lineup, not a solo act. πŸ‘‘


πŸ¦‹ Members πŸ¦‹

these are the girlies (the function pointers) doing the actual work:

  • count_get β€” gets the count of sensors that SCMI is providing. lowkey the headcount queen. πŸ“
  • info_get β€” gets the information of the specified sensor. it's giving "let me tell you everything about her". ✨
  • trip_point_config β€” selects and configures a trip-point of interest. picking favorites, but make it official. 🎯
  • reading_get β€” gets the current value of the sensor. the now-now data, no timestamp attached. πŸ“ˆ
  • reading_get_timestamped β€” gets the current value and timestamp, when available, of the sensor. (as of v3.0 spec) β€” those parentheses are the spec receipts, iykyk. also: supports multi-axis sensors for sensors which supports it, and if the reading array size of count entry equals the sensor num_axis. read that twice, it's a real condition, not a vibe. 🌈
  • config_get β€” Get sensor current configuration. πŸ’œ
  • config_set β€” Set sensor current configuration. πŸ”₯

πŸ‘€ SEE ALSO πŸ‘€

start with the source of truth β€” Kernel file ./include/linux/scmi_protocol.h β€” then go meet the whole friend group:

  • struct scmi_base_info(9)
  • struct scmi_clk_proto_ops(9)
  • struct scmi_perf_proto_ops(9)
  • struct scmi_power_proto_ops(9)
  • struct scmi_sensor_reading(9)
  • struct scmi_range_attrs(9)
  • struct scmi_sensor_axis_info(9)
  • struct scmi_sensor_intervals_info(9)
  • struct scmi_sensor_info(9)
  • struct scmi_reset_proto_ops(9)
  • struct scmi_voltage_info(9)
  • struct scmi_voltage_proto_ops(9)
  • struct scmi_powercap_info(9)
  • struct scmi_powercap_proto_ops(9)
  • struct scmi_pinctrl_proto_ops(9)
  • struct scmi_notify_ops(9)
  • struct scmi_handle(9)
  • module_scmi_driver(9)
  • module_scmi_protocol(9)

tiny note bestie: info_get is marked __must_check, so like… actually check what it hands you. don't be the one who ignores it. πŸ™ˆ

k bye ily, go read the header file πŸ’–

sign-off moment: this page lives in ./include/linux, stamped October 2026, and the whole thing answers to the name struct scmi_...or_proto_ops(9) β€” yes the abbreviation is doing its own thing, we love her anyway. 🫢🌸

πŸ“¦ where this page comes from