phy_get_tx_polarity(9)
π 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 ofPHY_POL_NORMALandPHY_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 π¦
- kernel file
./drivers/phy/phy-common-props.cπ fwnode_get_u32_prop_for_name(9)phy_get_rx_polarity(9)phy_get_manual_rx_polarity(9)phy_get_manual_tx_polarity(9)
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
- 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