Lines Matching refs:phydev

197 				   struct phy_device *phydev)  in of_mdiobus_link_phydev()  argument
199 struct device *dev = &phydev->dev; in of_mdiobus_link_phydev()
223 if (addr == phydev->addr) { in of_mdiobus_link_phydev()
231 struct phy_device *phydev) in of_mdiobus_link_phydev() argument
275 struct phy_device *phydev; in mdiobus_register() local
277 phydev = mdiobus_scan(bus, i); in mdiobus_register()
278 if (IS_ERR(phydev)) { in mdiobus_register()
279 err = PTR_ERR(phydev); in mdiobus_register()
340 struct phy_device *phydev; in mdiobus_scan() local
343 phydev = get_phy_device(bus, addr, false); in mdiobus_scan()
344 if (IS_ERR(phydev) || phydev == NULL) in mdiobus_scan()
345 return phydev; in mdiobus_scan()
351 of_mdiobus_link_phydev(bus, phydev); in mdiobus_scan()
353 err = phy_device_register(phydev); in mdiobus_scan()
355 phy_device_free(phydev); in mdiobus_scan()
359 return phydev; in mdiobus_scan()
422 struct phy_device *phydev = to_phy_device(dev); in mdio_bus_match() local
429 return phydrv->match_phy_device(phydev); in mdio_bus_match()
432 (phydev->phy_id & phydrv->phy_id_mask); in mdio_bus_match()
437 static bool mdio_bus_phy_may_suspend(struct phy_device *phydev) in mdio_bus_phy_may_suspend() argument
439 struct device_driver *drv = phydev->dev.driver; in mdio_bus_phy_may_suspend()
441 struct net_device *netdev = phydev->attached_dev; in mdio_bus_phy_may_suspend()
452 return !phydev->suspended; in mdio_bus_phy_may_suspend()
472 struct phy_device *phydev = to_phy_device(dev); in mdio_bus_suspend() local
479 if (phydev->attached_dev && phydev->adjust_link) in mdio_bus_suspend()
480 phy_stop_machine(phydev); in mdio_bus_suspend()
482 if (!mdio_bus_phy_may_suspend(phydev)) in mdio_bus_suspend()
485 return phy_suspend(phydev); in mdio_bus_suspend()
490 struct phy_device *phydev = to_phy_device(dev); in mdio_bus_resume() local
493 if (!mdio_bus_phy_may_suspend(phydev)) in mdio_bus_resume()
496 ret = phy_resume(phydev); in mdio_bus_resume()
501 if (phydev->attached_dev && phydev->adjust_link) in mdio_bus_resume()
502 phy_start_machine(phydev); in mdio_bus_resume()
509 struct phy_device *phydev = to_phy_device(dev); in mdio_bus_restore() local
510 struct net_device *netdev = phydev->attached_dev; in mdio_bus_restore()
516 ret = phy_init_hw(phydev); in mdio_bus_restore()
521 phydev->link = 0; in mdio_bus_restore()
522 phydev->state = PHY_UP; in mdio_bus_restore()
524 phy_start_machine(phydev); in mdio_bus_restore()
548 struct phy_device *phydev = to_phy_device(dev); in phy_id_show() local
550 return sprintf(buf, "0x%.8lx\n", (unsigned long)phydev->phy_id); in phy_id_show()
557 struct phy_device *phydev = to_phy_device(dev); in phy_interface_show() local
560 if (phy_is_internal(phydev)) in phy_interface_show()
563 mode = phy_modes(phydev->interface); in phy_interface_show()
572 struct phy_device *phydev = to_phy_device(dev); in phy_has_fixups_show() local
574 return sprintf(buf, "%d\n", phydev->has_fixups); in phy_has_fixups_show()