clkdm_clk_enable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… clkdm_clk_enable (the Kernel API Manual one, bestie)

Okay so like… this is from the Kernel API Manual, section 9, and the page is literally called clkdm_clk_enable. Yes the title and the manual name are the same vibe, that's just how manpages are. Slay.


✨ NAME ✨

clkdm_clk_enable β€” add an enabled downstream clock to this clkdm πŸŽ€


🌸 SYNOPSIS 🌸

int clkdm_clk_enable (struct clockdomain *clkdm , struct clk *unused );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • clkdm β€” a struct clockdomain *. This is the clockdomain bestie in question, the main character of the whole operation πŸ’–
  • unused β€” a struct clk *, being the enabled downstream clock. Yes, the parameter name literally says unused, iconic honestly, don't fight it 🫢

πŸ”₯ DESCRIPTION πŸ”₯

So what this does: it increments the usecount of the clockdomain clkdm, and makes sure that clockdomain is awake before clk gets enabled. It's intended to be called by clk_enable code β€” that's its whole little purpose in life ✨

Now, the deets, because this part highkey matters:

  • If the clockdomain is in software-supervised idle mode, it forces the clockdomain to wake. Periodt πŸ’…
  • If the clockdomain is in hardware-supervised idle mode, it adds clkdm-pwrdm autodependencies, so that devices in the clockdomain can be read from / written to by on-chip processors. No cap, that's the actual reason πŸ”₯

And the return values, ngl these are important so pay attention:

  • Returns -EINVAL if you pass it null pointers. Don't do that πŸ™ˆ
  • Returns 0 upon success β€” or if the clockdomain is in hwsup idle mode, which also gets you a 0. Basically a 0 is a 0, both are good πŸ’€

⭐ SEE ALSO ⭐

Kernel file ./arch/arm/mach-omap2/clockdomain.c, plus literally the entire clockdomain-adjacent family, go off πŸ‘‘

_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_add_sleepdep(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_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)


🧚 Little sign-off from the page itself: it lives under ./arch/arm/mach-omap2, and it's dated October 2026. Yeah, future energy. Obsessed. πŸ’œ
πŸ“¦ where this page comes from