STRUCT SCMI_PROTOCOL_HANDLE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct scmi_protocol_handle(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ β€” this one is literally the glow-up reference for an initialized protocol instance, no cap.


πŸŽ€ NAME πŸŽ€

struct scmi_protocol_handle β€” a reference to an initialized protocol instance. that's it, that's the vibe πŸ’–


✨ SYNOPSIS ✨

struct scmi_protocol_handle {
    struct device *dev;
    unsigned int version;
    const struct scmi_xfer_ops *xops;
    const struct scmi_proto_helpers_ops *hops;
    int (*set_priv)(const struct scmi_protocol_handle *ph, void *priv);
    void *(*get_priv)(const struct scmi_protocol_handle *ph);
 };

like… look at her. main character struct energy fr fr πŸ‘‘


🫢 Members 🫢

  • dev β€” a reference to the associated SCMI instance device (handle->dev). the whole "who's your people" field πŸ¦‹
  • version β€” the protocol version that's currently effectively in use by this initialized instance of the protocol. and the way this gets determined? at the end of any possibly-needed negotiations performed by the core. so like, whatever the negotiation saga ended up settling on πŸ’€
  • xops β€” a reference to a struct holding refs to the core xfer operations. your protocol implementation can use these to generate SCMI messages. this is the toolbox bestie πŸ”₯
  • set_priv β€” a method to set protocol private data for this instance. your little secret stash πŸ™ˆ
  • get_priv β€” a method to get protocol private data previously set. and then get it back out again ✨
ngl, notice how hops shows up in the struct up there but has no lil description of its own? yeah. that's just how it is, i'm not gonna invent lore for it. accuracy first, always πŸ’…

🌸 Description 🌸

so this structure represents a protocol initialized against a specific SCMI instance, and here's how she gets used:

  • as a parameter fed from the core to the protocol initialization code, so that it can access the core xfer operations to build and generate SCMI messages exclusively for the specific underlying protocol instance. like, no sharing, this is your protocol's protocol πŸ’œ
  • as an opaque handle fed by an SCMI driver user when it tries to access this protocol through its own protocol operations. in this case, this handle gets returned as an opaque object β€” together with the related protocol operations β€” when the SCMI driver tries to access the protocol. opaque icon behaviour, honestly πŸŽ€

🌈 SEE ALSO 🌈

kernel file ./drivers/firmware/arm_scmi/protocols.h β€” plus the whole friend group:

  • struct scmi_msg_resp_prot_version(9)
  • struct scmi_msg(9)
  • struct scmi_msg_hdr(9)
  • struct scmi_xfer(9)
  • struct scmi_iterator_state(9)
  • struct scmi_iterator_ops(9)
  • struct scmi_proto_helpers_ops(9)
  • struct scmi_xfer_ops(9)
  • struct scmi_protocol(9)

πŸ’– and that's the page!! sourced straight from ./drivers/firmware/arm_scmi, dated October 2026, struct scmi_protocol_handle(9) β€” go forth and slay your protocol init bestie 🧚⭐
πŸ“¦ where this page comes from