mtk_xfi_tphy_set_mode(9)
πΈ mtk_xfi_tphy_set_mode π
okay so bestie, real talk β this is a page straight out of the Kernel API Manual (section 9, the kernel-functions one, iykyk), and it's literally about telling the XFI T-PHY which interface mode it's living in. it's giving "tiny function, big responsibility" energy. let's get into it π«Ά
β¨ NAME β¨
mtk_xfi_tphy_set_mode β Setup phy for specified interface mode.
like, that's the whole job. it sets up the phy for whichever interface mode you picked. no cap, that's it π
π¦ SYNOPSIS π¦
int mtk_xfi_tphy_set_mode (struct phy *phy , enum phy_mode mode , int
submode );
(yes the line break is canon, don't come for me π)
π ARGUMENTS π
phyβ the Phy instance. your main character struct, the actual phy you're configuring πmodeβ ngl this one's picky: onlyPHY_MODE_ETHERNETis supported. that's the vibe check, and only one vibe passes it πsubmodeβ an Ethernet interface mode. this is where you say which flavor of ethernet you want, bestie π
π₯ DESCRIPTION π₯
so what actually happens? it validates the selected mode (checks you didn't hand it something unserious), and then it calls the function mtk_xfi_tphy_setup. that's the whole flow. validate β delegate. iconic delegation honestly π
β RETURN β
0β OK β everything slayed, we're good-EINVALβ invalid mode π© that's the "not me getting the wrong mode" error, it means whatever you passed in wasn't valid
πΈ SEE ALSO πΈ
go look at the kernel file ./drivers/phy/mediatek/phy-mtk-xfi-tphy.c β that's the source of truth, the mothership π
and then the whole friend group:
- struct
mtk_xfi_tphy(9) mtk_xfi_tphy_setup(9)mtk_xfi_tphy_reset(9)mtk_xfi_tphy_power_on(9)mtk_xfi_tphy_power_off(9)mtk_xfi_tphy_probe(9)
all of them are in the group chat, fr fr π
okay and finally, the sign-off π this whole thing lives in ./drivers/phy/mediatek, it's dated October 2026, and it came to you courtesy of the Kernel API Manual, page mtk_xfi_tphy_set_mode(9). that's the tea, bestie β go forth and set some modes β¨π¦π
π¦ 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