clkdm_add_sleepdep(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’€ 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 a struct clockdomain * and we're preventing it from sleeping.
  • clkdm2 β€” the source, aka the struct clockdomain * whose activity is the whole reason clkdm1 has 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:

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