STRUCT MN(9)
β¨ 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
- 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