ytphy_write_ext(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ytphy_write_ext(9) β€” the Kernel API Manual, but make it cute

okay so bestie, welcome to ytphy_write_ext(9) from the Kernel API Manual ✨ this one is short and sweet and it's literally just "write a PHY's extended register." That's the whole vibe. Let's get into it 🫢


🌸 NAME 🌸

ytphy_write_ext β€” write a PHY's extended register πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

int ytphy_write_ext (struct phy_device *phydev , u16 regnum , u16 val );

like, that's the whole signature, no cap. int in, int out (well, error code out, but we'll get there) πŸ’…


✨ ARGUMENTS ✨

  • phydev β€” a pointer to a struct phy_device πŸ¦‹ this is your PHY bestie, the actual device you're messing with
  • regnum β€” register number to write 🎯 which extended register you're aiming at
  • val β€” value to write to regnum ⭐ the thing you're putting in there, bestie

πŸ’€ NOTE πŸ’€

okay this part is important, do not skip it πŸ™ˆ

The caller must have taken the MDIO bus lock. fr fr, you gotta hold that lock before you call this β€” it's not gonna do it for you, and if you don't, that's on you 😭

It returns 0 or a negative error code. So 0 = slay, negative = something went sideways πŸ’…


🌈 SEE ALSO 🌈

so like, this function doesn't exist alone, it's part of a whole friend group πŸ‘‘ and the kernel file where all this lives is ./drivers/net/phy/motorcomm.c β€” that's the source of truth, iykyk πŸ“

Here's the whole squad, every single one, no skipping πŸ’–:

like, that's a lot of siblings, but they're all iconic in their own way 🌸


okay that's the whole page, bestie, you're officially educated πŸŽ“ this one came out of ./drivers/net/phy, dated October 2026 β€” mwah, love that for us πŸ’œπŸ¦‹

πŸ“¦ where this page comes from