spmi_device_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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_add adds it, spmi_device_put discards 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:


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