spmi_controller_remove(9)
π spmi_controller_remove(9) β the Kernel API Manual, bestie edition
okay so this page is literally from the Kernel API Manual, and it's about yeeting an SPMI controller out of existence. sit down, grab a strawberry π, we're gonna get through this together.
β¨ NAME β¨
spmi_controller_remove β remove an SPMI controller. that's it. that's the whole vibe. it takes the controller and it's like "bye bestie π".
π¦ SYNOPSIS π¦
void spmi_controller_remove (struct spmi_controller *ctrl );
yep, that's the whole signature β void return, one pointer arg, no surprises. copy it exactly, don't be quirky with it π
π ARGUMENTS π
ctrlβ the controller to remove. that's the one getting the goodbye speech. π«Ά
πΈ DESCRIPTION πΈ
so here's the tea: this function removes a SPMI controller. periodt. π―
but listen β the important bit, the part where you gotta pay attention, is that the caller is responsible for calling spmi_controller_put to discard the allocated controller. like, this function does its thing, and then you have to do yours. don't leave that controller just floating around, that's not the move π the put is how the allocated controller actually gets discarded, and that's on you, not on spmi_controller_remove. iykyk.
β οΈ real talk: if you skip the spmi_controller_put, you're the problem. the page says the caller is responsible, and the caller is... you. love that for you π
π SEE ALSO π
the whole friend group shows up here, plus the source file for good measure:
Kernel file ./drivers/spmi/spmi.c:
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_device_alloc(9)spmi_controller_alloc(9)spmi_controller_add(9)__spmi_driver_register(9)
go read them, they're all iconic in their own way π
π§ sign-off π§
this lil page lives in ./drivers/spmi and it's dated October 2026 β so yeah, future girlboss energy. and it's served up fresh from the Kernel API Manual, no cap. mwah πβ¨
slay, go remove that controller (and don't forget the put) π
π¦ 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