_clktrctrl_write(9)
π _clktrctrl_write(9) β like, the Kernel API Manual, bestie π
okay so this is a page from the Kernel API Manual, section 9, and the star of the show is _clktrctrl_write. Buckle up, it's a tiny function with a big job π
β¨ NAME β¨
_clktrctrl_write β write @c to a CM_CLKSTCTRL.CLKTRCTRL register bitfield πΈ
π¦ SYNOPSIS π¦
void _clktrctrl_write (u8 c , u8 part , u16 inst , u16 cdoffs );
that's the whole signature, no cap β returns nothing (void), takes four little args π«Ά
π ARGUMENTS π
cβ theCLKTRCTRLregister bitfield, and listen: it's the LSB = bit 0, i.e., unshifted value. like, do NOT pre-shift it, she handles that herself πpartβ the PRCM partition ID that theCM_CLKSTCTRLregister lives in πinstβ the CM instance register offset (that's the*_INSTmacro) βcdoffsβ the clockdomain register offset (that's the*_CDOFFSmacro) π¦
π DESCRIPTION π
so c must be the unshifted value for CLKTRCTRL β like, genuinely unshifted β because this function will handle the shift itself. she's got it, bestie, don't do her job for her πβ¨
π SEE ALSO π
the whole friend group π«Ά also peep the kernel file ./arch/arm/mach-omap2/cminst44xx.c:
omap_cm_base_init(9)_clkctrl_idlest(9)_is_module_ready(9)omap4_cminst_is_clkdm_in_hwsup(9)omap4_cminst_clkdm_enable_hwsup(9)omap4_cminst_clkdm_disable_hwsup(9)omap4_cminst_clkdm_force_wakeup(9)omap4_cminst_wait_module_ready(9)omap4_cminst_wait_module_idle(9)omap4_cminst_module_enable(9)omap4_cminst_module_disable(9)omap4_clkdm_save_context(9)omap4_clkdm_restore_context(9)
main character energy only: unshifted c in, correct bitfield out π no pre-shifting, iykyk
and that's the vibe check, bestie π this iconic lil page came from ./arch/arm/mach-omap2 and is dated October 2026 β periodt, slay, go write some registers ππ₯
π¦ 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