wrpll_calc_output_rate(9)
π wrpll_calc_output_rate β the kernel API manual, but make it make sense
okay so bestie, this is wrpll_calc_output_rate from the Kernel API Manual. yes it's a mouthful, no you don't have to say it out loud. it's a function, it does math, and honestly? it ate. π
β¨ NAME β¨
wrpll_calc_output_rate β literally just calculating the PLL's target output rate. that's it. that's the whole gig. π
π¦ SYNOPSIS π¦
unsigned long wrpll_calc_output_rate (const struct wrpll_cfg *c ,
unsigned long parent_rate );
not me writing unsigned long twice in one signature π anyway. it returns an unsigned long and it takes these two things:
cβ aconst struct wrpll_cfg *, i.e. a pointer to the config recordparent_rateβ anunsigned long, the PLL refclk rate
periodt. π
πΈ ARGUMENTS πΈ
cβ ptr to astruct wrpll_cfgrecord to read from. it'sconst, so we're reading, not touching. respectful king behavior tbh π«Άparent_rateβ the PLL refclk rate. the reference clock. the blueprint. the main character of the input side π₯
π DESCRIPTION π
so here's the vibe check: you hand this function a pointer to the PLL's current input configuration c, plus the PLL's input reference clock rate parent_rate β and important detail, that's the rate before the R pre-divider, bestie, don't forget the pre-divider π
then it calculates the PLL's output clock rate β and that's the one after the Q post-divider. so: pre-divider in, post-divider out. the glow-up is real. β¨
π CONTEXT π
Any context. no restrictions, she's flexible, she's versatile π§
β οΈ but the caller must protect the memory pointed to by c from simultaneous modification. that's on YOU, not on the function. no cap. π
β RETURN β
it returns the PLL's output clock rate, in Hz. π
and like β the return value from this function is intended to be convenient to pass directly to the Linux clock framework. so convenient, so slay. which means: there is no explicit error return value. no -EINVAL, no little sad error code, nothing. it just hands you a number and trusts you. π
π SEE ALSO π
- Kernel file
./drivers/clk/analogbits/wrpll-cln28hpc.cβ go read the source, iykyk π __wrpll_calc_filter_range(9)__wrpll_calc_fbdiv(9)__wrpll_calc_divq(9)__wrpll_update_parent_rate(9)wrpll_configure_for_rate(9)wrpll_calc_max_lock_us(9)
the whole friend group fr fr π«Ά
and that's the page!! mwah π this one lives in ./drivers/clk/analogbits and it's dated October 2026 β so yeah, she's from the future, iconic behavior honestly πβ¨πΈ
π¦ 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