rgmii_clock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ rgmii_clock(9) β€” a Kernel API Manual moment πŸŽ€

okay so bestie, you're reading the rgmii_clock page, and it's lowkey one of the most useful little guys in the PHY corner of the kernel. buckle up, it's short but it slaps πŸ’…


✨ NAME ✨

rgmii_clock β€” map link speed to the clock rate

like, speed goes in, clock rate comes out. iconic behavior, honestly πŸ¦‹


🌸 SYNOPSIS 🌸

long rgmii_clock (int speed );

that's it. that's the whole call. one argument, no drama πŸ’–


πŸ’œ ARGUMENTS πŸ’œ

  • speed β€” the link speed value. that's the vibe you're feeding in, bestie ✨

🫢 DESCRIPTION 🫢

okay so what it does: it maps RGMII supported link speeds into the clock rates. simple, clean, ate πŸ’…

and here's the fun part β€” you can also use it for MII, GMII, and RMII interface modes, because the clock rates are identical across all of them. slay!! 🌈

but (and this is the important bit, don't skip it πŸ™ˆ) β€” the caller must be aware that errors for unsupported clock rates will not be signalled. like, it's not gonna yell at you, it's not gonna return an error, it just... won't signal. so you have to know what you're doing. main character responsibility, fr fr πŸ‘‘


⭐ RETURN ⭐

clock rate, or a negative errno if things went sideways 😭


πŸ’€ SEE ALSO πŸ’€

okay this part is a whole situation, there are so many friends here, but they're all valid and you should absolutely go meet them:


real talk for a sec: the "unsupported clock rates won't be signalled" thing in DESCRIPTION is not a cute quirk, it's a genuine gotcha. validate your speeds, bestie 🫢

that's the whole page!! go forth and clock responsibly, iykyk πŸ’–βœ¨

β€” source ./include/linux, dated October 2026 🌸 signing off, mwah πŸ’‹

πŸ“¦ where this page comes from