diff options
author | Daniel Mack <zonque@gmail.com> | 2014-05-24 09:34:26 +0200 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-09-17 08:58:54 -0500 |
commit | 6824637a6a009e74abb98c53e6a71a428f2612ba (patch) | |
tree | 5a0b7099f8436942dfed19ef85f671a53c831811 /include/linux/of_mdio.h | |
parent | 65d76bbcdd9e2bcdc2a513b6fafa0ee5eeec3591 (diff) |
net: of_mdio: add of_mdiobus_link_phydev()
Add a function to walk the list of subnodes of a mdio bus and look for
a node that matches the phy's address with its 'reg' property. If found,
set the of_node pointer for the phy. This allows auto-probed pyh
devices to be augmented by information passed in via DT.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/of_mdio.h')
-rw-r--r-- | include/linux/of_mdio.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h index 30c55c782ea1..fda974e2bb7f 100644 --- a/include/linux/of_mdio.h +++ b/include/linux/of_mdio.h @@ -25,6 +25,9 @@ struct phy_device *of_phy_attach(struct net_device *dev, extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); +extern void of_mdiobus_link_phydev(struct mii_bus *mdio, + struct phy_device *phydev); + #else /* CONFIG_OF */ static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) { @@ -55,6 +58,11 @@ static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np) { return NULL; } + +static inline void of_mdiobus_link_phydev(struct mii_bus *mdio, + struct phy_device *phydev) +{ +} #endif /* CONFIG_OF */ #if defined(CONFIG_OF) && defined(CONFIG_FIXED_PHY) |