clkdm_add_sleepdep(9)
π€ clkdm_add_sleepdep(9) π€
ok so this is a page from the Kernel API Manual β yes bestie, the kernel has lore too. today's main character is clkdm_add_sleepdep, and she is literally the reason your clock domain stays awake when her friend is around. no cap.
β¨ NAME β¨
clkdm_add_sleepdep β add a sleep dependency from clkdm2 to clkdm1 π«Ά
πΈ SYNOPSIS πΈ
int clkdm_add_sleepdep (struct clockdomain *clkdm1 , struct clockdomain
*clkdm2 );
that's it, that's the whole vibe check π
π ARGUMENTS π
clkdm1β the dependent one, aka the clockdomain we're telling "girl, do NOT go to sleep." it's astruct clockdomain *and we're preventing it from sleeping.clkdm2β the source, aka thestruct clockdomain *whose activity is the whole reasonclkdm1has to stay up. if she's active, the party continues.
π¦ DESCRIPTION π¦
ok so the tea β: this function prevents clkdm1 from automatically going inactive β and like, obviously that also means it doesn't sneak off into retention or off β if clkdm2 is active. it's giving "you can't leave until your friend gets picked up" energy. π
now for the return values, because the vibes depend on them:
-EINVALπ β you handed over invalid clockdomain pointers, OR you called this on a machine that does not support software-configurable hardware sleep dependencies. (rude of the machine, honestly.)-ENOENTπ β the specified dependency cannot be set in hardware. it's just not happening, bestie.0π β success. slay. iconic. periodt.
π SEE ALSO π
this list is long long, so buckle up β every single one of these is a real reference to the kernel file ./arch/arm/mach-omap2/clockdomain.c:
_clkdm_register(9)_autodep_lookup(9)_resolve_clkdm_deps(9)_clkdm_add_wkdep(9)_clkdm_del_wkdep(9)_clkdm_add_sleepdep(9)_clkdm_del_sleepdep(9)clkdm_register_platform_funcs(9)clkdm_register_clkdms(9)clkdm_register_autodeps(9)clkdm_complete_init(9)clkdm_lookup(9)clkdm_for_each(9)clkdm_get_pwrdm(9)clkdm_add_wkdep(9)clkdm_del_wkdep(9)clkdm_read_wkdep(9)clkdm_clear_all_wkdeps(9)clkdm_del_sleepdep(9)clkdm_read_sleepdep(9)clkdm_clear_all_sleepdeps(9)clkdm_sleep_nolock(9)clkdm_sleep(9)clkdm_wakeup_nolock(9)clkdm_wakeup(9)clkdm_allow_idle_nolock(9)clkdm_allow_idle(9)clkdm_deny_idle_nolock(9)clkdm_deny_idle(9)clkdm_add_autodeps(9)clkdm_del_autodeps(9)clkdm_clk_enable(9)clkdm_clk_disable(9)clkdm_hwmod_enable(9)clkdm_hwmod_disable(9)_clkdm_save_context(9)_clkdm_restore_context(9)clkdm_save_context(9)clkdm_restore_context(9)
like I said. a whole friend group. π§ββοΈ
ngl bestie, if you got -EINVAL from the hardware-not-supported branch, that's not you β that's the machine. don't internalize it. π
and that's the page! this little gem lives in ./arch/arm/mach-omap2, dated October 2026 β the clkdm_add_sleepdep(9) era, and honestly? we were all there for it. πβ¨ byeee π
π¦ 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