wrpll_configure_for_rate(9)
π wrpll_configure_for_rate π
okay so this is a page from the Kernel API Manual, and the function we're obsessing over is wrpll_configure_for_rate β she computes PLL configuration for a target rate β¨
β¨ NAME β¨
wrpll_configure_for_rate β compute PLL configuration for a target rate π
πΈ SYNOPSIS πΈ
int wrpll_configure_for_rate (struct wrpll_cfg *c , u32 target_rate ,
unsigned long parent_rate );
π¦ ARGUMENTS π¦
cβ ptr to astruct wrpll_cfgrecord to write into. yes bestie, she writes into it, that's the whole job πtarget_rateβ the target PLL output clock rate (post-Q-divider). iykyk, post-Q-divider is doing a lot of work in that sentence nglparent_rateβ the PLL input refclk rate (pre-R-divider) π«Ά
π DESCRIPTION π
So what she actually does: compute the appropriate PLL signal configuration values and store them in the PLL context c. that's it, that's the function π
β οΈ okay bestie listen β PLL reprogramming is not glitchless. not me warning you twice. the caller should switch any downstream logic to a different clock source, or clock-gate it, before presenting these values to the PLL configuration signals. fr fr, do the switching first π
The caller must pass this function a pre-initialized struct wrpll_cfg record. and pre-initialized means literally one of these two things:
- initialized to zero (with the exception of the
.nameand.flagsfields) π - or read from the PLL π
π CONTEXT π
Any context. literally any. BUT β the caller must protect the memory pointed to by c from simultaneous access or modification. so like, no two threads pulling up to c at the same time, that's the vibe check π₯
β RETURN β
0 upon success; anything else upon failure. slay π
π§ SEE ALSO π§
- Kernel file
./drivers/clk/analogbits/wrpll-cln28hpc.c __wrpll_calc_filter_range(9)__wrpll_calc_fbdiv(9)__wrpll_calc_divq(9)__wrpll_update_parent_rate(9)wrpll_calc_output_rate(9)wrpll_calc_max_lock_us(9)
and that's the whole page bestie π«Ά this icon came from ./drivers/clk/analogbits, dated October 2026, and the header was literally just wrpll_configure_for_rate(9) again because the kernel loves repeating herself ππβ¨
π¦ 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