clkdm_clk_enable(9)
π 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β astruct clockdomain *. This is the clockdomain bestie in question, the main character of the whole operation πunusedβ astruct 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
-EINVALif you pass it null pointers. Don't do that π - Returns
0upon success β or if the clockdomain is in hwsup idle mode, which also gets you a0. 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
- 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