scmi_device_create(9)
π 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:
- 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 π
- 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 π
- the kernel file
./drivers/firmware/arm_scmi/bus.cβ go read it, it's right there π scmi_protocol_device_request(9)β the asking-for-it onescmi_protocol_device_unrequest(9)β the taking-it-back one
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
- 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