scmi_devm_protocol_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 an scmi_device whose embedded struct device is 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:


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