STRUCT XGENE_CLK_PMD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct xgene_clk_pmd β€” PMD clock ✨

okay bestie, so this is page struct xgene_clk_pmd(9) from the Kernel API Manual and honestly? it's giving "tiny struct, big responsibilities" πŸ’… she's just a little clock descriptor for the PMD (phase/frac divider thingy) on X-Gene, and she wants you to know every single one of her fields. let's get into it 🫢


🌸 NAME 🌸

struct xgene_clk_pmd β€” the PMD clock πŸ’– like, literally a struct that describes a PMD clock. no notes.


πŸŽ€ SYNOPSIS πŸŽ€

struct xgene_clk_pmd {
    struct clk_hw   hw;
    void __iomem    *reg;
    u8 shift;
    u32 mask;
    u64 denom;
    u32 flags;
    spinlock_t *lock;
 };

look at her. seven fields. immaculate. πŸ”₯


πŸ’œ MEMBERS πŸ’œ

  • hw β€” the handle that sits between the common clock interfaces and the hardware-specific ones 🌈 think of it as her little passport between two worlds, iykyk.
  • reg β€” the register that contains the fractional scale multiplier (the scaler) πŸ“ yes she's void __iomem *, yes she's memory-mapped, yes we stan.
  • shift β€” the shift to the unit bit field. u8. she's small but she moves things. ✨
  • mask β€” the mask to the unit bit field. u32. she's the vibe check that keeps only the bits that matter πŸ’…
  • denom β€” the 1/denominator unit. u64, so she's got range πŸ’€
  • flags β€” here's the interesting one, bestie, so pay attention πŸ™ˆ

XGENE_CLK_PMD_SCALE_INVERTED β€” by default the scaler is the value read from the register plus one. so like:

  • 0 β†’ (0 + 1) / denom
  • 1 β†’ (1 + 1) / denom
  • …and etc., you get the pattern, periodt πŸ”₯

but if this flag is set, she flips the whole thing:

  • 0 β†’ (denom - 0) / denom
  • 1 β†’ (denom - 1) / denom
  • …and etc. πŸ¦‹

same math, inverted energy. main character flag behaviour, no cap.

  • lock β€” the register lock. spinlock_t *. she keeps everyone from touching the registers at the same time πŸŽ€ respectful. collaborative. iconic.

πŸ‘‘ SEE ALSO πŸ‘‘

  • the Kernel file ./drivers/clk/clk-xgene.c β€” go read her home, that's where the whole story lives 🧚

and that's the page, bestie! πŸ“ go slay some clock registration.

πŸ’– written from source ./drivers/clk, dated October 2026, and yes the footer said struct xgene_clk_pmd(9) again because she loves a dramatic re-entrance ✨ mwah πŸ’‹

πŸ“¦ where this page comes from