sg2042_get_pll_ctl_setting(9)
π NAME π
okay so bestie, this is the sg2042_get_pll_ctl_setting(9) page from the Kernel API Manual, and it's literally the function that β based on the given FOUTPISTDIV and the input FREF β calculates the REFDIV/FBDIV/PSTDIV1/POSTDIV2 combination for the pllctrl register. no cap, that's the whole vibe β¨
πΈ SYNOPSIS πΈ
int sg2042_get_pll_ctl_setting (struct sg2042_pll_ctrl *best , unsigned
long req_rate , unsigned long parent_rate );
π ARGUMENTS π
bestβ output to hold calculated combination ofREFDIV/FBDIV/PSTDIV1/POSTDIV2. it's the lil container for the winning combo πreq_rateβ expected output clock rate, i.e.FOUTPISTDIV. bestie, this is the rate you're manifesting β¨parent_rateβ input parent clock rate, i.e.FREF. the source energy β
π₯ RETURN π₯
0β OK β-EINVALβ invalid argument π
so if you get 0, slay; if you get -EINVAL, check ur args, bestie π«Ά
π¦ SEE ALSO π¦
the kernel file is ./drivers/clk/sophgo/clk-sg2042-pll.c, and the related besties are:
struct sg2042_pll_clock(9)sg2042_pll_recalc_rate(9)sg2042_pll_get_postdiv_1_2(9)sg2042_clk_pll_recalc_rate(9)
k bye bestie π«Ά this page's source/version line says ./drivers/clk/sophgo, the date is October 2026, and the title is sg2042_get_pll_ctl_setting(9). mwah π
π¦ 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