STRUCT SCMI_ITERATOR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ STRUCT SCMI_ITERATOR(9) πŸ‘‘

okay so bestie, this page is straight out of the Kernel API Manual, and it's all about one little struct that does a lot of heavy lifting. no cap.


🌸 NAME 🌸

struct scmi_iterator β€” the iterator descriptor. that's it, that's the vibe. it's the little container that keeps track of where you are while you're walking through a multi-part SCMI message. main character energy fr.


✨ SYNOPSIS ✨

struct scmi_iterator {
    void *msg;
    void *resp;
    struct scmi_xfer *t;
    const struct scmi_protocol_handle *ph;
    struct scmi_iterator_ops *ops;
    struct scmi_iterator_state state;
    void *priv;
 };

that's the whole struct, copied exactly, don't come for me πŸ’…


🧚 MEMBERS 🧚

okay so let's go through the members one by one, because each one is iconic in its own way:

  • msg β€” a reference to the message TX buffer. it gets filled by prepare_message with a proper custom command payload for each multi-part command request. so like, this is the "here's what we're saying" slot 🫢
  • resp β€” a reference to the response RX buffer. this one gets used by update_state and process_response to parse the multi-part replies. the "here's what they said back" slot, yk?
  • t β€” a reference to the underlying xfer, which gets initialized and used transparently by the iterator's internal routines. so you don't even have to think about it, it just handles itself. lowkey the most reliable member here.
  • ph β€” a reference to the associated protocol handle that's going to be used. your connection to the protocol, bestie 🌈
  • ops β€” a reference to the custom-provided iterator operations. this is where the caller brings their own moves. it's giving "bring your own choreography" 🩰
  • state β€” the current iterator state. it gets used and updated in turn by the iterator's internal routines and by the caller-provided scmi_iterator_ops. so it's a whole team effort, everybody's touching it, no gatekeeping πŸ’–
  • priv β€” a reference to optional private data, as provided by the caller and passed back to the scmi_iterator_ops. your own little secret stash that comes right back to you πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

this is the part where I list everything, and I mean everything, because the original did and I'm not about to skip a single one. you're getting the full roster, periodt.

Kernel file ./drivers/firmware/arm_scmi/driver.c

like, that's a lot of friends. the whole friend group showed up to the function πŸ«‚


that's the whole page bestie, no crumbs left. go forth and iterate πŸ’…βœ¨

source: ./drivers/firmware/arm_scmi Β· October 2026 Β· mwah, love u, bye πŸŽ€
πŸ“¦ where this page comes from