clkdm_hwmod_enable(9)
π clkdm_hwmod_enable β the Kernel API Manual, bestie edition πΈ
okay so real talk, this one is a little function from the Kernel API Manual and it's lowkey iconic. buckle up π
β¨ NAME β¨
clkdm_hwmod_enable β literally adds an enabled downstream hwmod to this clkdm. that's the whole vibe. no cap π
π¦ SYNOPSIS π¦
int clkdm_hwmod_enable (struct clockdomain *clkdm , struct omap_hwmod
*oh );
yes bestie, that's the signature, copy it exactly, don't come for me π
π ARGUMENTS π
clkdmβ astruct clockdomain *. the clockdomain in question, the main character β¨ohβ astruct omap_hwmod *, specifically the one belonging to the enabled downstream hwmod π«Ά
π DESCRIPTION π
so here's the tea β β clkdm_hwmod_enable increments the usecount of the clockdomain clkdm and makes sure it's awake before oh gets enabled. it's intended to be called by module_enable code. iykyk π
now for the two modes, because this is where it gets good:
- 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-pwrdmautodependencies, so that devices in the clockdomain can be read from/written to by on-chip processors. slay π₯
and the returns, because we love clarity:
- returns
-EINVALif passed null pointers (do NOT do that bestie π) - returns
0upon success, or if the clockdomain is in hwsup idle mode β¨
π SEE ALSO π
okay this list is long but she ate, every single one of these is here:
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_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_enable(9), clkdm_clk_disable(9), clkdm_hwmod_disable(9), _clkdm_save_context(9), _clkdm_restore_context(9), clkdm_save_context(9), clkdm_restore_context(9)
π reminder bestie: null pointers get you -EINVAL. the function will not be nice about it. not me warning you twice π
and that's the page!! π§ quick sign-off: this whole thing lives in ./arch/arm/mach-omap2 (that's the source/version bit β¨), dated October 2026, and it's clkdm_hwmod_enable(9) forever and always ππ¦πΈ love u, go read a clockdomain π«Ά
π¦ 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