__cpuidle_register_driver(9)
π __cpuidle_register_driver(9) π
okay so bestie, we're in the Kernel API Manual today and this page is all about __cpuidle_register_driver β yes the double-underscore one, she's the internal baddie, don't confuse her with the regular one (more on that in SEE ALSO, and trust, there are so many of them) π«Ά
β¨ NAME β¨
__cpuidle_register_driver β register the driver. that's it, that's the name, she does exactly what it says on the tin π
πΈ SYNOPSIS πΈ
int __cpuidle_register_driver (struct cpuidle_driver *drv );
like, she takes one pointer and hands you back an int. iconic signature, no notes π₯
π¦ ARGUMENTS π¦
drvβ a valid pointer to astruct cpuidle_driver. and when I say valid, I mean it, because the very next section is about what happens when you don't bring a valid one π
π DESCRIPTION π
so here's the vibe check: she does some sanity checks first (gotta make sure you're not about to do something goofy), then she initializes the driver, then she assigns the driver to the global cpuidle driver variable(s), and then β the main character move β she sets up the broadcast timer if the cpuidle driver has some states that shut down the local timer. yes, those states. you know the ones. β°
Returns 0 on success, a negative error code otherwise:
-EINVALβ if the driver pointer isNULLor no idle states are available. literally nothing to work with, bestie π-ENODEVβ if the cpuidle framework is disabled. she's not even home rn π-EBUSYβ if the driver is already assigned to the global variable(s). taken. spoken for. not available. no cap π
lowkey important: those three error codes are the only documented ones here, so don't go inventing extra ones and blaming her β
π SEE ALSO π
Kernel file ./drivers/cpuidle/driver.c β and the whole friend group:
__cpuidle_get_cpu_driver(9), __cpuidle_unset_driver(9), __cpuidle_set_driver(9), __cpuidle_get_cpu_driver(9), __cpuidle_set_driver(9), __cpuidle_unset_driver(9), cpuidle_setup_broadcast_timer(9), __cpuidle_driver_init(9), __cpuidle_unregister_driver(9), cpuidle_register_driver(9), cpuidle_unregister_driver(9), cpuidle_get_driver(9), cpuidle_get_cpu_driver(9), cpuidle_driver_state_disabled(9)
(and yes, some of them are listed twice β that's the original's energy, we're not touching it, we respect the lore π§)
β and that's the page!! sourced straight from ./drivers/cpuidle, dated October 2026, and she's titled __cpuidle_register_driver(9) if you need to cite her in your group chat. slay, go register some drivers responsibly π
π¦ 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