Lines Matching refs:phydev
27 static int smsc_phy_config_intr(struct phy_device *phydev) in smsc_phy_config_intr() argument
29 int rc = phy_write (phydev, MII_LAN83C185_IM, in smsc_phy_config_intr()
30 ((PHY_INTERRUPT_ENABLED == phydev->interrupts) in smsc_phy_config_intr()
37 static int smsc_phy_ack_interrupt(struct phy_device *phydev) in smsc_phy_ack_interrupt() argument
39 int rc = phy_read (phydev, MII_LAN83C185_ISF); in smsc_phy_ack_interrupt()
44 static int smsc_phy_config_init(struct phy_device *phydev) in smsc_phy_config_init() argument
47 struct device *dev __maybe_unused = &phydev->dev; in smsc_phy_config_init()
49 int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); in smsc_phy_config_init()
60 rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, in smsc_phy_config_init()
66 return smsc_phy_ack_interrupt(phydev); in smsc_phy_config_init()
69 static int smsc_phy_reset(struct phy_device *phydev) in smsc_phy_reset() argument
71 int rc = phy_read(phydev, MII_LAN83C185_SPECIAL_MODES); in smsc_phy_reset()
83 phy_write(phydev, MII_LAN83C185_SPECIAL_MODES, rc); in smsc_phy_reset()
84 phy_write(phydev, MII_BMCR, BMCR_RESET); in smsc_phy_reset()
91 rc = phy_read(phydev, MII_BMCR); in smsc_phy_reset()
97 static int lan911x_config_init(struct phy_device *phydev) in lan911x_config_init() argument
99 return smsc_phy_ack_interrupt(phydev); in lan911x_config_init()
111 static int lan87xx_read_status(struct phy_device *phydev) in lan87xx_read_status() argument
113 int err = genphy_read_status(phydev); in lan87xx_read_status()
116 if (!phydev->link) { in lan87xx_read_status()
118 int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); in lan87xx_read_status()
122 rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, in lan87xx_read_status()
131 rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); in lan87xx_read_status()
139 rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); in lan87xx_read_status()
143 rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, in lan87xx_read_status()