STRUCT MN(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct mn(9) ✨

okay bestie, clutch your iced coffee because we're about to get into struct mn(9) from the Kernel API Manual β€” it's giving "M/N:D counter" and honestly? it's a whole vibe πŸ’…


🌸 NAME 🌸

struct mn β€” the M/N:D counter, and yes she's iconic for it πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

so here's the whole structure, exactly as it is, no cap:

struct mn {
    u8 mnctr_en_bit;
    u8 mnctr_reset_bit;
    u8 mnctr_mode_shift;
  #define MNCTR_MODE_DUAL 0x2;
  #define MNCTR_MODE_MASK 0x3;
    u8 n_val_shift;
    u8 m_val_shift;
    u8 width;
    bool reset_in_cc;
 };

like, look at her. fields upon fields. u8 this, bool that. absolute main character energy πŸ”₯


πŸ¦‹ MEMBERS πŸ¦‹

every field gets her moment, periodt:

πŸ’– mnctr_en_bit

the bit that enables the mn counter β€” she's the on switch, the literal vibe check for whether this counter is awake or not ⭐

πŸ’œ mnctr_reset_bit

the bit you assert to reset the mn counter β€” think of her as the big red "start over" button, except it's a bit, and it's lowkey doing the most πŸ™ˆ

🌸 mnctr_mode_shift

the lowest bit of the mn counter mode field β€” she marks where the mode bits begin, iconic little landmark that she is πŸŽ€

🧚 n_val_shift

the lowest bit of the n value field β€” this is where the n value starts living, and she knows it ✨

πŸ“ m_val_shift

the lowest bit of the m value field β€” same deal but for m, and honestly? she ate πŸ’…

πŸ”₯ width

the number of bits in the m/n/d values β€” like the width, the whole size of the situation, no notes πŸ‘‘

🌈 reset_in_cc

true if the mnctr_reset_bit is in the CC register β€” a simple little boolean that tells you where the reset bit is chillin' 🫢


πŸ”— SEE ALSO πŸ”—

head on over to the Kernel file ./drivers/clk/qcom/clk-rcg.h and say hi to the whole friend group:

  • struct pre_div(9)
  • struct src_sel(9)
  • struct clk_rcg(9)
  • struct clk_dyn_rcg(9)
  • struct clk_rcg2(9)

they all hang out together, iykyk πŸ’–


and that's the whole page, bestie πŸŽ‰ this little gem lives over at ./drivers/clk/qcom, and it's serving October 2026 energy from the Kernel API Manual. slay, stay hydrated, and go read a struct πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from