diff options
author | James Morris <james.l.morris@oracle.com> | 2014-09-30 10:44:04 -0400 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-09-30 10:44:04 -0400 |
commit | 6c8ff877cdf13cd5287ed9d700cfb6cb70e2bfa1 (patch) | |
tree | 2ab49b7d19fb69cdae5b6be9e7ba44f6cf3d45ef /drivers/of/of_mdio.c | |
parent | 35e1efd25a9e7d5cf2884fa23441ab87353849bb (diff) | |
parent | 19583ca584d6f574384e17fe7613dfaeadcdc4a6 (diff) |
Merge commit 'v3.16' into next
Diffstat (limited to 'drivers/of/of_mdio.c')
-rw-r--r-- | drivers/of/of_mdio.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index a3bf2122a8d5..401b2453da45 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c | |||
@@ -182,40 +182,6 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) | |||
182 | } | 182 | } |
183 | EXPORT_SYMBOL(of_mdiobus_register); | 183 | EXPORT_SYMBOL(of_mdiobus_register); |
184 | 184 | ||
185 | /** | ||
186 | * of_mdiobus_link_phydev - Find a device node for a phy | ||
187 | * @mdio: pointer to mii_bus structure | ||
188 | * @phydev: phydev for which the of_node pointer should be set | ||
189 | * | ||
190 | * Walk the list of subnodes of a mdio bus and look for a node that matches the | ||
191 | * phy's address with its 'reg' property. If found, set the of_node pointer for | ||
192 | * the phy. This allows auto-probed pyh devices to be supplied with information | ||
193 | * passed in via DT. | ||
194 | */ | ||
195 | void of_mdiobus_link_phydev(struct mii_bus *mdio, | ||
196 | struct phy_device *phydev) | ||
197 | { | ||
198 | struct device *dev = &phydev->dev; | ||
199 | struct device_node *child; | ||
200 | |||
201 | if (dev->of_node || !mdio->dev.of_node) | ||
202 | return; | ||
203 | |||
204 | for_each_available_child_of_node(mdio->dev.of_node, child) { | ||
205 | int addr; | ||
206 | |||
207 | addr = of_mdio_parse_addr(&mdio->dev, child); | ||
208 | if (addr < 0) | ||
209 | continue; | ||
210 | |||
211 | if (addr == phydev->addr) { | ||
212 | dev->of_node = child; | ||
213 | return; | ||
214 | } | ||
215 | } | ||
216 | } | ||
217 | EXPORT_SYMBOL(of_mdiobus_link_phydev); | ||
218 | |||
219 | /* Helper function for of_phy_find_device */ | 185 | /* Helper function for of_phy_find_device */ |
220 | static int of_phy_match(struct device *dev, void *phy_np) | 186 | static int of_phy_match(struct device *dev, void *phy_np) |
221 | { | 187 | { |