scmi_device_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scmi_device_create β€” from the Kernel API Manual, bestie

okay so picture this: you're deep in the kernel, the SCMI core is doing its thing, and you need a device. or like, several devices. that's literally what this function is for. it's the glow-up-factory for struct scmi_device ✨


✨ NAME ✨

scmi_device_create β€” a method to create one or more SCMI devices 🫢


🌸 SYNOPSIS 🌸

struct scmi_device * scmi_device_create (struct device_node *np , struct device *parent , int protocol , const char *name );

like yes, that's the whole signature, no cap πŸ“


πŸŽ€ ARGUMENTS πŸŽ€

  • np β€” a reference to the device node to use for the new device(s). it's giving "where the vibes come from" 🌱
  • parent β€” the parent device, and the way it identifies a specific SCMI instance. so like, which SCMI are we even talking about πŸ’«
  • protocol β€” the SCMI protocol to be associated with this device. this is the whole category, iykyk πŸ”₯
  • name β€” the requested-name of the device to be created. and bestie, this one is optional: if no name is provided, then all the devices currently known to be requested on the SCMI bus for protocol will be created. literally all of them 🎁

πŸ¦‹ DESCRIPTION πŸ¦‹

so this method can be invoked in two whole moods:

  1. to create a single well-defined device β€” like a transport device, or a device requested by an SCMI driver that got loaded after the core SCMI stack has already been probed πŸš€
  2. to create all the devices currently known to have been requested by the loaded SCMI drivers for a specific protocol β€” which is typically what happens during SCMI core protocol enumeration at probe time πŸ‘‘

both are valid, both are iconic, your choice πŸ’…


⭐ RETURN ⭐

you get back the created device β€” or one of them, if name was NOT provided and multiple devices were created β€” or NULL if no device was created 😭

but listen, this part matters, so pay attention:

NULL indicates an error ONLY in the case where a specific name was provided. when the name param was not provided, a number of devices could have potentially been created for a whole protocol β€” unless no device was found to have been requested for that specific protocol. read that twice, it's a vibe check on your error handling πŸ™ˆ

🌈 SEE ALSO 🌈


okay that's the whole page, you ate that πŸ’– and for the credits moment: this one lives in ./drivers/firmware/arm_scmi under the Kernel API Manual, dated October 2026 β€” mwah, go create some devices, you're gonna slay βœ¨πŸ‘‘πŸ§š

πŸ“¦ where this page comes from