sg2042_get_pll_ctl_setting(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 of REFDIV/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:


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