STRUCT TEGRA_CLK_FRAC_DIV(9)
π struct tegra_clk_frac_div(9) π
okay so bestie, welcome to the Kernel API Manual π«Ά β today's main character is struct tegra_clk_frac_div, aka the fractional divider clock. she's a struct, she's iconic, and she's about to make ur clock tree make sense. periodt. β¨
πΈ NAME πΈ
struct tegra_clk_frac_div β fractional divider clock π
π SYNOPSIS π
struct tegra_clk_frac_div {
struct clk_hw hw;
void __iomem *reg;
u8 flags;
u8 shift;
u8 width;
u8 frac_width;
spinlock_t *lock;
};
like, that's the whole vibe right there. no cap. π
π¦ Members π¦
hwβ the handle between the common clock interfaces and the hardware-specific ones π the little bridge between two worlds, honestly kind of giving main character energyregβ the register containing the divider π that's where she livesflagsβ hardware-specific flags π© (scroll down, there's a whole section, it's a lot, i love it)shiftβ shift to the divider bit field β‘οΈ how far u gotta scoot overwidthβ width of the divider bit field π how many bits she's occupyingfrac_widthβ width of the fractional bit field π° the fractional one!! separate width!! yes bestielockβ register lock π nobody touches the register without the lock, we respect boundaries here
β¨ Description β¨
okay so the Flags section, and bestie, listen up, there are FOUR of them and each one does something different π
TEGRA_DIVIDER_ROUND_UPβ this flag indicates to round up the divider value π₯ round UP, not down, don't get it twistedTEGRA_DIVIDER_FIXEDβ fixed rate PLL dividers have an additional override bit, and this flag indicates that this divider is for a fixed rate PLL π iykykTEGRA_DIVIDER_INTβ some modules cannot cope with the duty cycle when the fraction bit is set π so this flag indicates to calculate a divider for which the fraction bit will be zero β yeah, we zero it out, it's the only way she'll behaveTEGRA_DIVIDER_UARTβ the UART module divider has an additional enable bit which is set when the divider value is not0π this flag indicates that the divider is for the UART module β
ngl these flags are doing a LOT of emotional labor for one u8. respect. π«Ά
π₯ SEE ALSO π₯
Kernel file ./drivers/clk/tegra/clk.h β go read her, she's the source of truth π
and the whole friend group:
struct tegra_clk_sync_source(9)struct tegra_clk_pll_freq_table(9)struct pdiv_map(9)struct div_nmp(9)struct tegra_clk_pll_params(9)struct tegra_clk_pll(9)struct tegra_audio_clk_info(9)struct tegra_clk_pll_out(9)struct tegra_clk_periph_regs(9)struct tegra_clk_periph_gate(9)struct tegra_sdmmc_mux(9)
π¦ okay that's the whole page bestie, u ate that π
sign-off time: this lil masterpiece lives in ./drivers/clk/tegra, dated October 2026, and yes she's still serving struct tegra_clk_frac_div(9) energy πΈπβ¨
π¦ 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