spmi_device_alloc(9)
π NAME π
spmi_device_alloc β Allocate a new SPMI device β¨
okay so this is spmi_device_alloc(9) from the Kernel API Manual, and it's literally the helper that allocates a new SPMI device π
β¨ SYNOPSIS β¨
struct spmi_device * spmi_device_alloc (struct spmi_controller *ctrl );
π ARGUMENTS π
ctrlβ the associated controller ποΈ
π¦ DESCRIPTION π¦
so here's the vibe check, bestie: the caller is responsible for either calling spmi_device_add to add the newly allocated controller, or calling spmi_device_put to discard it. that's the whole contract β you get the fresh allocation, then you either add it or put it π
no cap:spmi_device_addadds it,spmi_device_putdiscards it. those are the two paths, and the caller has to pick one β¨
π SEE ALSO π
Kernel file ./drivers/spmi/spmi.c β and yes, the whole friend group is here:
spmi_device_add(9)spmi_device_remove(9)spmi_register_read(9)spmi_ext_register_read(9)spmi_ext_register_readl(9)spmi_register_write(9)spmi_register_zero_write(9)spmi_ext_register_write(9)spmi_ext_register_writel(9)spmi_command_reset(9)spmi_command_sleep(9)spmi_command_wakeup(9)spmi_command_shutdown(9)spmi_find_device_by_of_node(9)spmi_controller_alloc(9)spmi_controller_add(9)spmi_controller_remove(9)__spmi_driver_register(9)
okay bye bestie π«Ά β this page's source/version is ./drivers/spmi, its date stamp is <date>October 2026</date>, and it's all about spmi_device_alloc(9) π
π¦ 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