phy_get_manual_tx_polarity(9)
π phy_get_manual_tx_polarity(9) π
okay so bestie, we're in the Kernel API Manual β yes, that Kernel API Manual β and today's main character is phy_get_manual_tx_polarity. it's giving very niche, very specific, very "you either need it or you don't" energy, and honestly? we respect it. π
β¨ NAME β¨
phy_get_manual_tx_polarity β get the manual TX polarity for a PHY differential lane π¦
like, it literally fetches the TX polarity you set by hand. no cap, that's the whole job.
πΈ SYNOPSIS πΈ
int phy_get_manual_tx_polarity (struct fwnode_handle *fwnode , const
char *mode_name , unsigned int *val );
three args, one int coming back at you. simple. iconic. π₯
π ARGUMENTS π
fwnodeβ pointer to the PHY's firmware node. this is the plug, the source of truth, the firmware-side bestie π«Άmode_nameβ the name of the PHY mode to look up. yes, you gotta name the mode. it's not gonna guess, bestie πvalβ pointer to the returned polarity. it writes the answer back through this pointer, so don't hand it a garbage address fr fr π
π DESCRIPTION π
so here's the vibe: this is a helper for PHYs that come with no custom default value for the TX polarity. none. zero. nada. π
like, if your PHY had a default, you wouldn't be here. but it doesn't, so you call this, pass your fwnode, your mode_name, your val pointer, and it goes and looks the manual polarity up for you. that's the whole slay. β¨
β RETURN β
zeroon success β we love a clean return π- negative error on failure β it's giving "something went wrong, check your fwnode" π
π SEE ALSO π
- Kernel file
./drivers/phy/phy-common-props.cβ that's where the magic lives, go read it iykyk π fwnode_get_u32_prop_for_name(9)phy_get_rx_polarity(9)phy_get_tx_polarity(9)phy_get_manual_rx_polarity(9)
the whole polarity friend group honestly β rx, tx, manual rx, manual tx, they're all here and they're all eating π
lowkey reminder: this is for the manual lane, and it's for PHYs without a custom default. if that's not you, go check the other polarity functions first, bestie π§
kisses and goodbye from ./drivers/phy β this page is dated October 2026 under the Kernel API Manual, and yes, that's the whole footer, 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