wrpll_configure_for_rate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 a struct wrpll_cfg record 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 ngl
  • parent_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 .name and .flags fields) πŸŽ€
  • 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 🧚


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