STRUCT SCMI_SENSOR_PROTO_OPS(9)
π 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 ofcountentry equals the sensornum_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_getis 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
- 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