STRUCT DIV_NMP(9)
π struct div_nmp(9) β the Kernel API Manual glow-up π
okay so bestie, we're in the kernel docs again (specifically the manual page called struct div_nmp(9), yes that's the whole name, don't @ me) and today's main character is a struct that is obsessed with where things sit and how wide they are. It's giving "I know my shifts and my widths and I will not let you forget them." π
β¨ NAME β¨
struct div_nmp β literally just the offset and width of the m, n and p fields. That's it, that's the whole job, and it does it flawlessly π«Ά
π SYNOPSIS π
struct div_nmp {
u8 divn_shift;
u8 divn_width;
u8 divm_shift;
u8 divm_width;
u8 divp_shift;
u8 divp_width;
u8 override_divn_shift;
u8 override_divm_shift;
u8 override_divp_shift;
};
no cap, that's the exact shape of it β commit it to memory, bestie π§ β¨
π Members π
nine little u8s and every single one of them matters, let's meet the cast π
divn_shiftβ the shift to the feedback divider bit field π₯divn_widthβ the width of the feedback divider bit field, iconic, no notesdivm_shiftβ the shift to the input divider bit field π«divm_widthβ the width of the input divider bit field, slaydivp_shiftβ the shift to the post divider bit field πΈdivp_widthβ the width of the post divider bit field, we love a consistent queenoverride_divn_shiftβ the shift to the feedback divider bitfield in the override reg π (yes, it says bitfield, one word, we respect the original spelling)override_divm_shiftβ the shift to the input divider bitfield in the override reg πoverride_divp_shiftβ the shift to the post divider bitfield in the override reg β
lowkey the pattern is so clean it hurts:n= feedback,m= input,p= post. three divider besties, three shifts, three widths, and then the override shifts for the override reg. periodt π
π¦ SEE ALSO π¦
the whole friend group, all living in the Kernel file ./drivers/clk/tegra/clk.h β go say hi bestie, they're all linked and they all have their own manual pages:
struct tegra_clk_sync_source(9)struct tegra_clk_frac_div(9)struct tegra_clk_pll_freq_table(9)struct pdiv_map(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)
and that's the page, diva π this little struct came to you from ./drivers/clk/tegra, dated October 2026, and honestly it ate. go read the tegra clock headers, ily, bye πβ¨π¦
π¦ 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