Lines Matching +full:keep +full:- +full:power +full:- +full:in +full:- +full:suspend
1 // SPDX-License-Identifier: GPL-2.0+
25 /* Vendor-specific PHY Definitions */
60 struct smsc_phy_priv *priv = phydev->priv; in smsc_phy_config_intr()
63 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) { in smsc_phy_config_intr()
68 priv->intmask = MII_LAN83C185_ISF_INT4 | MII_LAN83C185_ISF_INT6; in smsc_phy_config_intr()
69 if (priv->energy_enable) in smsc_phy_config_intr()
70 priv->intmask |= MII_LAN83C185_ISF_INT7; in smsc_phy_config_intr()
72 rc = phy_write(phydev, MII_LAN83C185_IM, priv->intmask); in smsc_phy_config_intr()
74 priv->intmask = 0; in smsc_phy_config_intr()
88 struct smsc_phy_priv *priv = phydev->priv; in smsc_phy_handle_interrupt()
93 if (irq_status != -ENODEV) in smsc_phy_handle_interrupt()
99 if (!(irq_status & priv->intmask)) in smsc_phy_handle_interrupt()
109 struct smsc_phy_priv *priv = phydev->priv; in smsc_phy_config_init()
112 if (!priv->energy_enable || phydev->irq != PHY_POLL) in smsc_phy_config_init()
132 /* If the SMSC PHY is in power down mode, then set it in smsc_phy_reset()
133 * in all capable mode before using it. in smsc_phy_reset()
150 switch (phydev->mdix_ctrl) { in lan87xx_config_aneg()
175 phydev->mdix = phydev->mdix_ctrl; in lan87xx_config_aneg()
183 if (phydev->phy_id != 0x0007c0f0) /* not (LAN9500A or LAN9505A) */ in lan95xx_config_aneg_ext()
197 * The LAN87xx suffers from rare absence of the ENERGYON-bit when Ethernet cable
198 * plugs in while LAN87xx is in Energy Detect Power-Down mode. This leads to
199 * unstable detection of plugging in Ethernet cable.
200 * This workaround disables Energy Detect Power-Down mode and waiting for
202 * The Energy Detect Power-Down mode is enabled again in the end of procedure to
203 * save approximately 220 mW of power if cable is unplugged.
204 * The workaround is only applicable to poll mode. Energy Detect Power-Down may
205 * not be used in interrupt mode lest link change detection becomes unreliable.
209 struct smsc_phy_priv *priv = phydev->priv; in lan87xx_read_status()
213 if (!phydev->link && priv->energy_enable && phydev->irq == PHY_POLL) { in lan87xx_read_status()
234 /* Re-enable EDPD */ in lan87xx_read_status()
289 struct device *dev = &phydev->mdio.dev; in smsc_phy_probe()
290 struct device_node *of_node = dev->of_node; in smsc_phy_probe()
296 return -ENOMEM; in smsc_phy_probe()
298 priv->energy_enable = true; in smsc_phy_probe()
300 if (of_property_read_bool(of_node, "smsc,disable-energy-detect")) in smsc_phy_probe()
301 priv->energy_enable = false; in smsc_phy_probe()
303 phydev->priv = priv; in smsc_phy_probe()
305 /* Make clk optional to keep DTB backward compatibility. */ in smsc_phy_probe()
332 .suspend = genphy_suspend,
356 .suspend = genphy_suspend,
385 .suspend = genphy_suspend,
400 .suspend = genphy_suspend,
429 .suspend = genphy_suspend,
455 .suspend = genphy_suspend,
485 .suspend = genphy_suspend,