phy_get_rx_polarity(9)
π phy_get_rx_polarity β get the RX polarity for a PHY differential lane
Okay bestie, so this is a page from the Kernel API Manual and honestly? It's a little function that does exactly one thing and does it cute. It's phy_get_rx_polarity, and it goes and fetches the RX polarity setting for a PHY differential lane. Yes, polarity. Yes, differential lanes. We love a niche queen. πΈ
β¨ SYNOPSIS β¨
int phy_get_rx_polarity (struct fwnode_handle *fwnode , const char
*mode_name , unsigned int supported , unsigned int default_val ,
unsigned int *val );
Like, that's the whole vibe: you hand it a firmware node, a mode name, a bitmask of what's allowed, a fallback, and somewhere to put the answer. She returns an int, because of course she does. π
π«Ά ARGUMENTS π«Ά
fwnodeβ pointer to the PHY's firmware node. This is the starting point, the main character, the place she goes looking. πmode_nameβ the name of the PHY mode to look up. String in, knowledge out, iykyk.supportedβ a bit mask ofPHY_POL_NORMAL,PHY_POL_INVERTandPHY_POL_AUTO. That's the menu of polarity values she's allowed to give you back. π¦default_valβ the default polarity value you get if the property is missing. Bestie fallback. She's got your back. β¨valβ pointer to the returned polarity. This is where the answer lands. Write her address down, she's got mail. π
π₯ RETURN π₯
zeroon success β slay, we ate, the polarity has arrived π- negative error on failure β no cap, something went wrong, she's telling you with a negative number π
π SEE ALSO π
- Kernel file
./drivers/phy/phy-common-props.cβ go read the source, it's giving lore π fwnode_get_u32_prop_for_name(9)phy_get_tx_polarity(9)phy_get_manual_rx_polarity(9)phy_get_manual_tx_polarity(9)
So many siblings! It's a whole family of polarity getters and, honestly, they're all iconic. π§
ngl the RX half of the lane is living its truth here β polarity is serious business, so always check that return value, okay? π
That's the whole page, bestie. No notes, 10/10, would read again. π
And finally, the little sign-off: this one lives under ./drivers/phy, dated October 2026, and that's the version of the Kernel API Manual we're all swooning over. Mwah. π
β
π¦ 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