STRUCT SCMI_PROTO_HELPERS_OPS(9)
π struct scmi_proto_helpers_ops β NAME π
okay so this is from the Kernel API Manual, and bestie, it's literally just the struct scmi_proto_helpers_ops β a big ol' bundle of references to common protocol helpers. That's it, that's the whole vibe. It's the friend group of function pointers that all the SCMI protocols share so nobody has to reinvent the wheel πβ¨
π SYNOPSIS π
like, here's the whole struct, no cap:
struct scmi_proto_helpers_ops {
int (*extended_name_get)(const struct scmi_protocol_handle *ph, u8 cmd_id, u32 res_id, u32 *flags, char *name, size_t len);
void *(*iter_response_init)(const struct scmi_protocol_handle *ph, struct scmi_iterator_ops *ops, unsigned int max_resources, u8 msg_id, size_t tx_size, void *priv);
int (*iter_response_run)(void *iter);
int (*iter_response_run_bound)(void *iter, unsigned int *start, unsigned int *end);
void (*iter_response_bound_cleanup)(void *iter);
int (*protocol_msg_check)(const struct scmi_protocol_handle *ph, u32 message_id, u32 *attributes);
void (*fastchannel_init)(const struct scmi_protocol_handle *ph, u8 describe_id, u32 message_id, u32 valid_size, u32 domain, void __iomem **p_addr, struct scmi_fc_db_info **p_db, u32 *rate_limit);
void (*fastchannel_db_ring)(struct scmi_fc_db_info *db);
int (*get_max_msg_size)(const struct scmi_protocol_handle *ph);
};
π¦ Members π¦
okay so let me introduce you to every single one of these icons, one by one, no skipping π
extended_name_getβ a common helper function that gets you the extended naming for the specified resource, using the specified command. The result comes back as a NULL terminated string dropped into the pre-allocated area pointed to byname, and that area's max capacity islenbytes. So like, don't overflow it bestie, it's giving "respect the buffer" π«Άiter_response_initβ a common helper that initializes a generic iterator for parsing multi-message responses. When it runs, the iterator takes care of sending the initial command request exactly as specified bymsg_idandtx_size, and then parses the multi-part responses using the custom operations you handed it inops. It's giving "I'll handle the logistics, you bring the vibes" β¨iter_response_runβ a common helper that triggers the run of a previously initialized iterator. heads up though: unbound iterators are automatically cleaned up, so no manual cleanup era for these ones π§Ήiter_response_run_boundβ same energy, triggers the run of a previously initialized iterator β but only within the specified, optional,startandendresource indexes. And warning bestie: these bound-iterators need explicit cleanup viaiter_response_bound_cleanup. They do NOT clean up after themselves, main character energy fr πiter_response_bound_cleanupβ a common helper to finally release the iterator, specifically for bound iterators. The designated cleaner-upper πprotocol_msg_checkβ a common helper to check if a specific protocol message is supported. vibe check for messages, basically πfastchannel_initβ a common helper used to initialize FC descriptors by gathering FC descriptions from the SCMI platform server. Very fetch πfastchannel_db_ringβ a common helper to ring a FC doorbell. ding dong, the doorbell's ringing πget_max_msg_sizeβ a common helper to get the maximum message size. short king of a function, extremely useful πΈ
π SEE ALSO π
go read these next, they're all in the Kernel file ./drivers/firmware/arm_scmi/protocols.h:
struct scmi_msg_resp_prot_version(9)struct scmi_msg(9)struct scmi_msg_hdr(9)struct scmi_xfer(9)struct scmi_protocol_handle(9)struct scmi_iterator_state(9)struct scmi_iterator_ops(9)struct scmi_xfer_ops(9)struct scmi_protocol(9)
π reminder bestie: this all lives under./drivers/firmware/arm_scmi, dated October 2026, and the header up top and footer down bottom are thestruct scmi..._helpers_ops(9)Kernel API Manual situation β slay, go read the source, ily, 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