STRUCT SPMI_DRIVER(9)
π struct spmi_driver(9) π
okay so this is from the Kernel API Manual bestie, and it's literally all about struct spmi_driver β the SPMI slave device driver. buckle up, it's short but it's iconic π
πΈ NAME πΈ
struct spmi_driver β the SPMI slave device driver. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
here's the whole struct, bestie, look at her:
struct spmi_driver {
struct device_driver driver;
int (*probe)(struct spmi_device *sdev);
void (*remove)(struct spmi_device *sdev);
void (*shutdown)(struct spmi_device *sdev);
};
π Members π
driverβ the actualstruct device_driverinside. SPMI device drivers should initialize thenameandownerfield of this structure. don't skip it fr, it's giving "forgot to set owner" energy and nobody wants that πprobeβ this one binds this driver to a SPMI device. signature isint (*probe)(struct spmi_device *sdev), okurrr β¨removeβ unbinds this driver from the SPMI device.void (*remove)(struct spmi_device *sdev), the breakup arc πshutdownβ shuts down this driver.void (*shutdown)(struct spmi_device *sdev), goodbye bestie π«Ά
π« Description π«
so like, if PM runtime support is desired for a slave (yes that's the actual phrasing, PM runtime support, main character energy for real), a device driver can call pm_runtime_put from their probe routine β and then a balancing pm_runtime_get in remove. keep them balanced bestie, it's the law π₯
PM runtime support for a slave is implemented by issuing a SLEEP command to the slave on runtime_suspend, which transitions the slave into the SLEEP state π΄β¨
then on runtime_resume, a WAKEUP command is sent to the slave to bring it back to ACTIVE. wake up babe, new state just dropped βοΈπ
π¦ SEE ALSO π¦
- Kernel file
./include/linux/spmi.h struct spmi_device(9)struct spmi_controller(9)spmi_controller_put(9)spmi_driver_unregister(9)
go read them, iykyk ππ
and that's the whole page bestie π§ lived in ./include/linux, dated October 2026, straight out of the Kernel API Manual β mwah, slay, periodt π
ππ
π¦ 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