STRUCT SCMI_POWER_PROTO_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ struct scmi_power_proto_ops(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for struct scmi_power_proto_ops β€” and yes, that's the whole title, we're being extra official today ✨


🌸 NAME 🌸

struct scmi_power_proto_ops β€” literally the struct that represents all the various operations provided by the SCMI Power Protocol 🫢 like that's its whole job and it ate


✨ SYNOPSIS ✨

struct scmi_power_proto_ops {
    int (*num_domains_get)(const struct scmi_protocol_handle *ph);
    const char *(*name_get)(const struct scmi_protocol_handle *ph, u32 domain);
  #define SCMI_POWER_STATE_TYPE_SHIFT     30;
  #define SCMI_POWER_STATE_ID_MASK        (BIT(28) - 1);
  #define SCMI_POWER_STATE_PARAM(type, id)         ((((type) & BIT(0)) << SCMI_POWER_STATE_TYPE_SHIFT) |                 ((id) & SCMI_POWER_STATE_ID_MASK));
  #define SCMI_POWER_STATE_GENERIC_ON     SCMI_POWER_STATE_PARAM(0, 0);
  #define SCMI_POWER_STATE_GENERIC_OFF    SCMI_POWER_STATE_PARAM(1, 0);
    int (*state_set)(const struct scmi_protocol_handle *ph, u32 domain, u32 state);
    int (*state_get)(const struct scmi_protocol_handle *ph, u32 domain, u32 *state);
 };

no cap, that's the whole lineup πŸ‘‘ the function pointers are the main characters, and the #defines are the little supporting cast that make the state math work πŸ’–


πŸŽ€ Members πŸŽ€

  • num_domains_get β€” get the count of power domains provided by SCMI πŸ”’ like, how many power domains are we even working with, bestie
  • name_get β€” gets the name of a power domain 🏷️ every domain deserves a name, honestly iconic
  • state_set β€” sets the power state of a power domain πŸ”₯ you're the one in charge now
  • state_get β€” gets the power state of a power domain πŸ‘€ just peeking, no touching

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/scmi_protocol.h β€” and the whole friend group, fr fr:

  • struct scmi_base_info(9)
  • struct scmi_clk_proto_ops(9)
  • struct scmi_perf_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_sensor_proto_ops(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)

πŸ’œ that's the whole page, bestie πŸ’œ

signing off from ./include/linux, dated October 2026, in the struct scmi_power_proto_ops(9) era πŸŽ€ iykyk β€” go power-cycle something responsibly 🌈⭐

πŸ“¦ where this page comes from