devm_phy_package_join(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 target struct phy_device we'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 πŸ¦‹

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