devm_phy_destroy(9)
π devm_phy_destroy(9) β like, the Kernel API Manual edition, bestie π
okay so picture this: you're deep in drivers/phy land, the kernel is vibing, and you've got a PHY that needs to β¨ go away β¨. That's this page. It's giving cleanup era. It lives in the Kernel API Manual, and honestly? Iconic. π¦
πΈ NAME πΈ
devm_phy_destroy β destroy the PHY, no cap π
β¨ SYNOPSIS β¨
void devm_phy_destroy (struct device *dev , struct phy *phy );
like, that's the whole signature. she's short, she's sweet, she returns void and takes no prisoners π«Ά
π§ ARGUMENTS π§
devβ the device that wants to release this phy. yes, this device. the one doing the releasing. main character energy πphyβ the phy returned bydevm_phy_get. don't just pass some random phy you found on the street, fr fr π
π DESCRIPTION π
so what does she actually do? two things. and she does them both:
- destroys the devres associated with this phy π
- invokes
phy_destroyto destroy the phy π
that's it. that's the function. devres gets yeeted, phy_destroy gets called, the phy is gone. slay. π₯
π SEE ALSO π
the whole friend group shows up for this one, iykyk. Kernel file ./drivers/phy/phy-core.c and then, in order:
phy_create_lookup(9)phy_remove_lookup(9)phy_init(9)phy_exit(9)phy_power_on(9)phy_power_off(9)phy_calibrate(9)phy_notify_connect(9)phy_notify_disconnect(9)phy_notify_state(9)phy_configure(9)phy_validate(9)_of_phy_get(9)of_phy_get(9)of_phy_put(9)phy_put(9)devm_phy_put(9)of_phy_simple_xlate(9)phy_get(9)devm_phy_get(9)devm_phy_optional_get(9)devm_of_phy_get(9)devm_of_phy_optional_get(9)devm_of_phy_get_by_index(9)phy_create(9)devm_phy_create(9)phy_destroy(9)__of_phy_provider_register(9)__devm_of_phy_provider_register(9)of_phy_provider_unregister(9)devm_of_phy_provider_unregister(9)phy_release(9)
like, a full roster. go read them all. or at least the ones you need. no pressure bestie π«Ά
lowkey reminder: this is the devm flavour β the devres bookkeeping is the whole point, so don't go thinking you can skip it and manually free later. that's a different function's job, and she's in the SEE ALSO list above π
β and that's the page!! brought to you by ./drivers/phy, dated October 2026, and filed under devm_phy_destroy(9) β go forth and destroy some PHYs responsibly, 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