STRUCT DIV_NMP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ 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 notes
  • divm_shift β€” the shift to the input divider bit field πŸ’«
  • divm_width β€” the width of the input divider bit field, slay
  • divp_shift β€” the shift to the post divider bit field 🌸
  • divp_width β€” the width of the post divider bit field, we love a consistent queen
  • override_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