phy_get_tx_polarity(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… phy_get_tx_polarity

okay so bestie, ever wondered which way your TX lane is pointing?? this is the kernel API manual page for phy_get_tx_polarity, and yes, it's giving "niche but iconic" ✨ it lives in section 9 (kernel API manual), so it's for the real ones writing driver code 🫢


✨ NAME ✨

phy_get_tx_polarity β€” get the TX polarity for a PHY differential lane 🌸

like, is the lane normal? is it inverted? this function is literally the vibe check for that.


πŸŽ€ SYNOPSIS πŸŽ€

int phy_get_tx_polarity (struct fwnode_handle *fwnode , const char
       *mode_name , unsigned int supported , unsigned int default_val ,
       unsigned int *val );

no cap, that's five arguments, so buckle up πŸ¦‹


πŸ”₯ ARGUMENTS πŸ”₯

  • fwnode β€” pointer to the PHY's firmware node. this is where the info comes from, main character energy πŸ’œ
  • mode_name β€” the name of the PHY mode to look up πŸ‘‘
  • supported β€” bit mask of PHY_POL_NORMAL and PHY_POL_INVERT ⭐
  • default_val β€” default polarity value if the property is missing πŸ™ˆ (yes, there's a fallback, we love a safety net)
  • val β€” pointer to the returned polarity πŸ’– this is where the answer lands

🌈 RETURN 🌈

zero on success, negative error on failure πŸ’€ that's it, that's the whole contract β€” 0 means slay, negative means something went wrong, periodt.


πŸ¦‹ SEE ALSO πŸ¦‹

iykyk β€” if you're messing with one polarity getter, you're probably gonna want the whole friend group πŸ’…


okurrr that's the whole page bestie πŸŽ€ this gem comes from ./drivers/phy, dated October 2026, and it's the phy_get_tx_polarity(9) kernel API manual page β€” go forth and get that polarity, you've got this fr fr πŸ’–βœ¨

πŸ“¦ where this page comes from