devm_phy_package_join(9)
π devm_phy_package_join(9) β from the Kernel API Manual, bestie β¨
okay so picture this: you're a driver, you've got a PHY package situation, and you want the kernel to handle the cleanup so you don't have to. that's literally this function. it's devm_phy_package_join() and it's giving responsible-adult energy π«Ά
πΈ SYNOPSIS πΈ
int devm_phy_package_join (struct device *dev , struct phy_device
*phydev , int base_addr , size_t priv_size );
four args, one int back. simple. clean. we love to see it π
π ARGUMENTS π
devβ the device that's registering this PHY package. yes, this one. the one doing the registering. main character behavior honestly πphydevβ the targetstruct phy_devicewe're pointing at. that's the vibe check target π¦base_addrβ the cookie and the base PHY address of the PHY package. it's used for offset calculation when you do global register access, so don't just toss a random number in there, iykyk πpriv_sizeβ if this is non-zero, the function allocates this many bytes for private data. if it's zero? then no allocation, no problem, we move π§
β¨ DESCRIPTION β¨
this is phy_package_join() but managed β like, the grown-up version with a safety net π
the shared storage gets fetched by this function, and phy_package_leave is automatically called on driver detach. automatic. no cap. you don't have to remember, the kernel remembers for you ππ
want the full lore? go read phy_package_join β this one just points you there. no gatekeeping π
π¦ SEE ALSO π¦
- Kernel file
./drivers/net/phy/phy_package.cstruct phy_package_shared(9)phy_package_lock(9)phy_package_unlock(9)__phy_package_read_mmd(9)__phy_package_write_mmd(9)phy_package_join(9)of_phy_package_join(9)phy_package_leave(9)devm_of_phy_package_join(9)
a whole friend group of package functions fr fr, go say hi to all of them π«ΆπΈ
ngl bestie, the whole point is the managed part. let devm clean up after you on detach, that's the entire slay π
okay that's the page!! sourced from ./drivers/net/phy, dated October 2026, and it's devm_phy_package_join(9) forever and always βπ bye bestie, go join a package responsibly ππ
π¦ 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