clkdm_hwmod_enable(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” a struct clockdomain *. the clockdomain in question, the main character ✨
  • oh β€” a struct 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-pwrdm autodependencies, 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 -EINVAL if passed null pointers (do NOT do that bestie 😭)
  • returns 0 upon 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