Lines Matching refs:mdio
36 int of_mdiobus_phy_device_register(struct mii_bus *mdio, struct phy_device *phy, in of_mdiobus_phy_device_register() argument
39 return fwnode_mdiobus_phy_device_register(mdio, phy, in of_mdiobus_phy_device_register()
45 static int of_mdiobus_register_phy(struct mii_bus *mdio, in of_mdiobus_register_phy() argument
48 return fwnode_mdiobus_register_phy(mdio, of_fwnode_handle(child), addr); in of_mdiobus_register_phy()
51 static int of_mdiobus_register_device(struct mii_bus *mdio, in of_mdiobus_register_device() argument
58 mdiodev = mdio_device_create(mdio, addr); in of_mdiobus_register_device()
77 dev_dbg(&mdio->dev, "registered mdio device %pOFn at address %i\n", in of_mdiobus_register_device()
149 int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) in of_mdiobus_register() argument
156 return mdiobus_register(mdio); in of_mdiobus_register()
164 mdio->phy_mask = ~0; in of_mdiobus_register()
166 device_set_node(&mdio->dev, of_fwnode_handle(np)); in of_mdiobus_register()
169 mdio->reset_delay_us = DEFAULT_GPIO_RESET_DELAY; in of_mdiobus_register()
170 of_property_read_u32(np, "reset-delay-us", &mdio->reset_delay_us); in of_mdiobus_register()
171 mdio->reset_post_delay_us = 0; in of_mdiobus_register()
172 of_property_read_u32(np, "reset-post-delay-us", &mdio->reset_post_delay_us); in of_mdiobus_register()
175 rc = mdiobus_register(mdio); in of_mdiobus_register()
181 addr = of_mdio_parse_addr(&mdio->dev, child); in of_mdiobus_register()
188 rc = of_mdiobus_register_phy(mdio, child, addr); in of_mdiobus_register()
190 rc = of_mdiobus_register_device(mdio, child, addr); in of_mdiobus_register()
193 dev_err(&mdio->dev, in of_mdiobus_register()
211 if (mdiobus_is_registered_device(mdio, addr)) in of_mdiobus_register()
215 dev_info(&mdio->dev, "scan phy %pOFn at address %i\n", in of_mdiobus_register()
223 rc = of_mdiobus_register_phy(mdio, child, addr); in of_mdiobus_register()
236 mdiobus_unregister(mdio); in of_mdiobus_register()
296 put_device(&phy->mdio.dev); in of_phy_connect()
440 put_device(&phydev->mdio.dev); /* of_phy_find_device() */ in of_phy_deregister_fixed_link()