STRUCT SCMI_PROTOCOL_INSTANCE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ struct scmi_protocol_instance β€” Kernel API Manual, bestie edition πŸ’œ

okay so you're in the Kernel API Manual and the thing on the menu today is struct scmi_protocol_instance, which β€” say it with me β€” is literally just a lil container describing an initialized protocol instance ✨. That's the whole vibe. She's initialized, she's got a protocol, she's got a handle. Iconic.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct scmi_protocol_instance {
    const struct scmi_handle        *handle;
    const struct scmi_protocol      *proto;
    void *gid;
    refcount_t users;
    void *priv;
    unsigned int                    version;
    unsigned int                    negotiated_version;
    struct scmi_protocol_handle     ph;
 };

no cap, that's the whole struct. now let's meet the members one by one, they all have main character energy 🌸


πŸŽ€ Members πŸŽ€

  • handle β€” reference to the SCMI handle that's associated with this protocol instance. like, her specific handle. her person. 🫢
  • proto β€” a reference to the protocol descriptor. the blueprint, the origin story, iykyk.
  • gid β€” a reference for per-protocol devres management. yes bestie, per-protocol, don't get it twisted.
  • users β€” a refcount tracking the effective users of this protocol. she's counting who's actually using her rn, lowkey.
  • priv β€” reference for optional protocol private data. optional!! she can have secrets, that's her right πŸ’…
  • version β€” the protocol version supported by the platform, as detected at runtime. not compile time, runtime. periodt.
  • negotiated_version β€” okay this one's the drama ✨ when the platform supports a newer protocol version, the agent will try to negotiate with the platform about using the newest version it knows about, because backward compatibility is NOT automatically assured (yes, capital N-O-T, the manpage is yelling, respect it 😭). This field is NON-zero when a successful negotiation has completed. non-zero = it worked, zero = nothing negotiated, fr fr.
  • ph β€” an embedded protocol handle that gets passed down to protocol initialization code so it can identify this instance. she's embedded. she travels. she identifies. πŸ¦‹

🌈 Description 🌈

Each protocol gets initialized independently, once for each SCMI platform in which it's defined by DT and implemented by the SCMI server fw. so like, one per platform, no sharing, no borrowing, no "can I copy your homework" β€” each one does her own thing πŸ’–


⭐ SEE ALSO ⭐

Kernel file ./drivers/firmware/arm_scmi/driver.c, plus this whole friend group right here:


πŸ’€ reminder bestie: that "backward compatibility is NOT automatically assured" line is not me being dramatic, that's the actual caveat. negotiate or perish.

okay that's the whole page, go touch grass 🌱 β€” this one came from ./drivers/firmware/arm_scmi, dated October 2026, and the header up top is struct scmi...col_instance(9) (yes it's truncated in the header, no we don't know why, the terminal did that, not me πŸ™ˆ). mwah, bye πŸ’‹πŸŽ€

πŸ“¦ where this page comes from