STRUCT SCMI_ITERATOR(9)
π 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 byprepare_messagewith 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 byupdate_stateandprocess_responseto parse the multi-part replies. the "here's what they said back" slot, yk?tβ a reference to the underlyingxfer, 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-providedscmi_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 thescmi_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
struct scmi_xfers_info(9)struct scmi_protocol_instance(9)struct scmi_info(9)scmi_create_protocol_devices(9)scmi_xfer_token_set(9)scmi_xfer_token_clear(9)scmi_xfer_inflight_register_unlocked(9)scmi_xfer_inflight_register(9)scmi_xfer_raw_inflight_register(9)scmi_xfer_pending_set(9)scmi_xfer_get(9)scmi_xfer_raw_get(9)scmi_xfer_raw_channel_get(9)__scmi_xfer_put(9)scmi_xfer_raw_put(9)scmi_xfer_lookup_unlocked(9)scmi_bad_message_trace(9)scmi_msg_response_validate(9)scmi_xfer_state_update(9)scmi_xfer_command_acquire(9)scmi_rx_callback(9)xfer_put(9)scmi_wait_for_message_response(9)scmi_xfer_raw_wait_for_message_response(9)do_xfer(9)do_xfer_with_response(9)xfer_get_init(9)version_get(9)scmi_set_protocol_priv(9)scmi_get_protocol_priv(9)scmi_common_extended_name_get(9)scmi_common_get_max_msg_size(9)scmi_protocol_msg_check(9)scmi_revision_area_get(9)scmi_protocol_version_negotiate(9)scmi_protocol_version_initialize(9)scmi_alloc_init_protocol_instance(9)scmi_get_protocol_instance(9)scmi_protocol_acquire(9)scmi_protocol_release(9)scmi_devm_protocol_get(9)scmi_devm_protocol_acquire(9)scmi_devm_protocol_put(9)scmi_is_transport_atomic(9)scmi_handle_get(9)scmi_handle_put(9)scmi_channels_setup(9)
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
- 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