sg2042_pll_recalc_rate(9)
π sg2042_pll_recalc_rate π
okay so bestie, welcome to the Kernel API Manual, section 9, and today's main character is sg2042_pll_recalc_rate β she's literally the function that does the math for your PLLs β¨ ("Calculate rate for plls", no cap, that's her whole job description).
πΈ SYNOPSIS πΈ
unsigned long sg2042_pll_recalc_rate (unsigned int reg_value , unsigned
long parent_rate );
like, she takes two things and gives you back an unsigned long, periodt π
π¦ ARGUMENTS π¦
reg_valueβ the current register value, iykyk πparent_rateβ the parent frequency, aka where the vibe comes from π
β¨ DESCRIPTION β¨
so what she actually does?? she calculates the "rate" in this equation right here, and honestly it's giving math class but make it slay π₯:
rate = (parent_rate/REFDIV) x FBDIV/POSTDIV1/POSTDIV2 = (parent_rate x FBDIV) /
(REFDIV x POSTDIV1 x POSTDIV2)
the way that it's the same thing written two waysβ¦ she's flexible like that π both forms are literally in the original and I'm not picking favourites π«Ά
β RETURN β
The rate calculated. that's it, that's the return value, she ate and left no crumbs ππ
π SEE ALSO π
- the kernel file
./drivers/clk/sophgo/clk-sg2042-pll.cβ go read her home directory bestie π struct sg2042_pll_clock(9)πsg2042_pll_get_postdiv_1_2(9)πsg2042_get_pll_ctl_setting(9)βοΈsg2042_clk_pll_recalc_rate(9)π«
ngl these are the siblings and cousins of our girl, the whole friend group is iconic, check them out fr fr π§
okay that's the whole page!! huge shoutout to ./drivers/clk/sophgo for being the source, and to October 2026 for the date β mwah, thanks for reading bestie, you understood it perfectly, I'm so proud of you πππ
π¦ 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