scmi_devm_protocol_get(9)
π scmi_devm_protocol_get(9) β Kernel API Manual π
okay so bestie, welcome to the group chat. this page lives in the Kernel API Manual and it's about scmi_devm_protocol_get β literally the devres-managed way to grab protocol operations and the handle that comes with them. let's get into it π
β¨ NAME β¨
scmi_devm_protocol_get β Devres managed get protocol operations and handle
π¦ SYNOPSIS π¦
const void * scmi_devm_protocol_get (struct scmi_device *sdev , u8 protocol_id , struct scmi_protocol_handle **ph );
πΈ ARGUMENTS πΈ
sdevβ a reference to anscmi_devicewhose embeddedstruct deviceis gonna be used for devres accounting. yeah, it's that device's vibes we're putting on the tab π³protocol_idβ the protocol being requested. which one do you want, bestie?phβ a pointer reference used to pass back the associated protocol handle. it's an out-param, so it hands you the handle on the way out π«Ά
π DESCRIPTION π
okay so here's what's happening. this gets hold of a protocol, accounting for its usage, and eventually triggers its initialization. then it returns the protocol-specific operations and the related protocol handle β and that handle is the one that'll be used as the first argument in most of the protocol's operations methods. main character energy for real π
and here's the actual slay: it's a devres based managed method. so the protocol hold gets released automatically β and possibly de-initialized on the last user β once the SCMI driver that owns the scmi_device is unbound from it. no manual cleanup, no cap, it just handles itself π
π₯ RETURN π₯
a reference to the requested protocol operations, or an error. and bestie, you must check it for errors β caller's job, fr fr. don't be out here assuming it worked π
π SEE ALSO π
this is the whole friend group, no one gets left out:
Kernel file ./drivers/firmware/arm_scmi/driver.cstruct 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)struct scmi_iterator(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_acquire(9)scmi_devm_protocol_put(9)scmi_is_transport_atomic(9)scmi_handle_get(9)scmi_handle_put(9)scmi_channels_setup(9)
and that's the whole page, bestie! π this little gem lives over in ./drivers/firmware/arm_scmi, it's dated October 2026, and you can find it filed under scmi_devm_protocol_get(9). go check your errors and stay iconic β¨π¦π
π¦ 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