Lines Matching refs:child
46 struct device_node *child, u32 addr) in of_mdiobus_register_phy() argument
53 is_c45 = of_device_is_compatible(child, in of_mdiobus_register_phy()
56 if (!is_c45 && !of_get_phy_id(child, &phy_id)) in of_mdiobus_register_phy()
63 rc = irq_of_parse_and_map(child, 0); in of_mdiobus_register_phy()
71 if (of_property_read_bool(child, "broken-turn-around")) in of_mdiobus_register_phy()
76 of_node_get(child); in of_mdiobus_register_phy()
77 phy->mdio.dev.of_node = child; in of_mdiobus_register_phy()
84 of_node_put(child); in of_mdiobus_register_phy()
89 child->name, addr); in of_mdiobus_register_phy()
93 struct device_node *child, u32 addr) in of_mdiobus_register_device() argument
105 of_node_get(child); in of_mdiobus_register_device()
106 mdiodev->dev.of_node = child; in of_mdiobus_register_device()
112 of_node_put(child); in of_mdiobus_register_device()
117 child->name, addr); in of_mdiobus_register_device()
173 static bool of_mdiobus_child_is_phy(struct device_node *child) in of_mdiobus_child_is_phy() argument
177 if (of_get_phy_id(child, &phy_id) != -EINVAL) in of_mdiobus_child_is_phy()
180 if (of_device_is_compatible(child, "ethernet-phy-ieee802.3-c45")) in of_mdiobus_child_is_phy()
183 if (of_device_is_compatible(child, "ethernet-phy-ieee802.3-c22")) in of_mdiobus_child_is_phy()
186 if (of_match_node(whitelist_phys, child)) { in of_mdiobus_child_is_phy()
189 child->full_name); in of_mdiobus_child_is_phy()
193 if (!of_find_property(child, "compatible", NULL)) in of_mdiobus_child_is_phy()
209 struct device_node *child; in of_mdiobus_register() local
229 for_each_available_child_of_node(np, child) { in of_mdiobus_register()
230 addr = of_mdio_parse_addr(&mdio->dev, child); in of_mdiobus_register()
236 if (of_mdiobus_child_is_phy(child)) in of_mdiobus_register()
237 of_mdiobus_register_phy(mdio, child, addr); in of_mdiobus_register()
239 of_mdiobus_register_device(mdio, child, addr); in of_mdiobus_register()
246 for_each_available_child_of_node(np, child) { in of_mdiobus_register()
248 if (of_find_property(child, "reg", NULL)) in of_mdiobus_register()
258 child->name, addr); in of_mdiobus_register()
260 if (of_mdiobus_child_is_phy(child)) in of_mdiobus_register()
261 of_mdiobus_register_phy(mdio, child, addr); in of_mdiobus_register()