Lines Matching +full:a +full:- +full:child +full:- +full:node +full:- +full:property

26  * of_mdiobus_register - Register mii_bus and create PHYs from the device tree
30 * This function registers the mii_bus structure and registers a phy_device
31 * for each child node of @np.
36 struct device_node *child; in of_mdiobus_register() local
41 mdio->phy_mask = ~0; in of_mdiobus_register()
44 if (mdio->irq) in of_mdiobus_register()
46 mdio->irq[i] = PHY_POLL; in of_mdiobus_register()
53 /* Loop over the child nodes and register a phy_device for each one */ in of_mdiobus_register()
54 for_each_child_of_node(np, child) { in of_mdiobus_register()
59 /* A PHY must have a reg property in the range [0-31] */ in of_mdiobus_register()
60 paddr = of_get_property(child, "reg", &len); in of_mdiobus_register()
62 dev_err(&mdio->dev, "%s has invalid PHY address\n", in of_mdiobus_register()
63 child->full_name); in of_mdiobus_register()
69 dev_err(&mdio->dev, "%s PHY address %i is too large\n", in of_mdiobus_register()
70 child->full_name, addr); in of_mdiobus_register()
74 if (mdio->irq) { in of_mdiobus_register()
75 mdio->irq[addr] = irq_of_parse_and_map(child, 0); in of_mdiobus_register()
76 if (!mdio->irq[addr]) in of_mdiobus_register()
77 mdio->irq[addr] = PHY_POLL; in of_mdiobus_register()
82 dev_err(&mdio->dev, "error probing PHY at address %i\n", in of_mdiobus_register()
87 /* Associate the OF node with the device structure so it in of_mdiobus_register()
89 of_node_get(child); in of_mdiobus_register()
90 phy->dev.of_node = child; in of_mdiobus_register()
96 of_node_put(child); in of_mdiobus_register()
100 dev_dbg(&mdio->dev, "registered phy %s at address %i\n", in of_mdiobus_register()
101 child->name, addr); in of_mdiobus_register()
111 return dev->of_node == phy_np; in of_phy_match()
115 * of_phy_find_device - Give a PHY node, find the phy_device
116 * @phy_np: Pointer to the phy's device tree node
118 * Returns a pointer to the phy_device.
132 * of_phy_connect - Connect to the phy described in the device tree
134 * @phy_np: Pointer to device tree node for the PHY
138 * Returns a pointer to the phy_device if successful. NULL otherwise
155 * of_phy_connect_fixed_link - Parse fixed-link property and return a dummy phy
160 * This function is a temporary stop-gap and will be removed soon. It is
174 if (!dev->dev.parent) in of_phy_connect_fixed_link()
177 net_np = dev->dev.parent->of_node; in of_phy_connect_fixed_link()
181 phy_id = of_get_property(net_np, "fixed-link", &sz); in of_phy_connect_fixed_link()
185 sprintf(bus_id, PHY_ID_FMT, "fixed-0", be32_to_cpu(phy_id[0])); in of_phy_connect_fixed_link()