Thread (16 messages) 16 messages, 4 authors, 2023-03-28
STALE1175d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH net-next v2 5/8] net: phy: at803x: Indicate SmartEEE support for AR8035 and AR8031 PHYs

From: Oleksij Rempel <o.rempel@pengutronix.de>
Date: 2023-03-27 14:24:20
Also in: lkml
Subsystem: ethernet phy library, networking drivers, the rest · Maintainers: Andrew Lunn, Heiner Kallweit, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

This commit adds SmartEEE support indication for the AR8035 and AR8031
PHYs in the at803x driver. These PHYs support the SmartEEE
functionality, which is a Low Power Idle (LPI) implementation on the PHY
side, typically handled by the MAC.

By indicating SmartEEE support for these PHYs, the at803x driver and the
PHYlib framework can provide proper configuration and management of EEE
and LPI features. This allows for improved power management and energy
efficiency in devices using AR8035 and AR8031 PHYs.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/phy/at803x.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
index 656136628ffd..653d27a2e62b 100644
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -856,6 +856,12 @@ static int at803x_probe(struct phy_device *phydev)
 	if (ret)
 		return ret;
 
+	if (phydev->drv->phy_id == ATH8035_PHY_ID ||
+	    phydev->drv->phy_id == ATH8031_PHY_ID) {
+		if (!(priv->flags & AT803X_DISABLE_SMARTEEE))
+			phydev->is_smart_eee_phy = true;
+	}
+
 	if (priv->vddio) {
 		ret = regulator_enable(priv->vddio);
 		if (ret < 0)
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help