phy_validate(9)
β¨ phy_validate(9) β¨
okay so this is a page from the Kernel API Manual, and honestly? it's giving "quiet little helper that does zero drama." let's get into it π
πΈ NAME πΈ
phy_validate β bestie, this one checks the phy parameters. that's it, that's the whole job π«Ά
π¦ SYNOPSIS π¦
int phy_validate (struct phy *phy , enum phy_mode mode , int submode ,
union phy_configure_opts *opts );
π ARGUMENTS π
phyβ the phy, and no cap it's the one you got back fromphy_get. literally that exact one, don't go making up your own πmodeβ thephy_modethis configuration actually applies to. pick the right one, iykyk.submodeβ the PHY submode this configuration applies to. yes there's a submode. yes it matters. πoptsβ the configuration you want checked. hand it over, we'll vibe check it.
π DESCRIPTION π
so the whole point: this is used to check that the current set of parameters can be handled by the phy. like, "hey girl, can you even do this?" and the phy answers.
and here's the iconic part β implementations are free to tune the parameters passed as arguments if some implementation detail or constraint needs it. no cap, they can adjust your stuff on the way through.
BUT β¨ and this is the important bit β¨ it will not change any actual configuration of the PHY. nope. none. zero. so calling it as many times as deemed fit will have no side effect β spam it, queen, it's totally safe, it's the low-stakes bestie of the phy API π§
π RETURN π
0if successful π- a negative error code otherwise π
π SEE ALSO π
kernel file ./drivers/phy/phy-core.c, plus the whole friend group:
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)_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)devm_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)
and that's the whole page, bestie π this one came from ./drivers/phy, dated October 2026, and it's filed as phy_validate(9) β slay, go validate some phys 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