[PATCH v2 2/2] net: phy: motorcomm: add missing trigger link for YT8521

From
Chukun Pan <hidden>
Date
2026-11-20 10:00:14
Also in
lkml
Reply to
Chukun Pan, 2026-11-20
TRIGGER_NETDEV_LINK is available in led_hw_control_set,
but missing in led_hw_control_get. Add it.

Signed-off-by: Chukun Pan <redacted>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---
Changes in v2:
  Collect Reviewed-by
---
 drivers/net/phy/motorcomm.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c
index 5a0cd4d7d633..4552eee872a8 100644
--- a/drivers/net/phy/motorcomm.c
+++ b/drivers/net/phy/motorcomm.c
@@ -1918,6 +1918,11 @@ static int yt8521_led_hw_control_get(struct phy_device *phydev, u8 index,
 	if (val & YT8521_LED_10_ON_EN)
 		__set_bit(TRIGGER_NETDEV_LINK_10, rules);
 
+	if ((val & YT8521_LED_10_ON_EN) &&
+	    (val & YT8521_LED_100_ON_EN) &&
+	    (val & YT8521_LED_1000_ON_EN))
+		__set_bit(TRIGGER_NETDEV_LINK, rules);
+
 	return 0;
 }
 
-- 
2.34.1
Thread (3 messages) 3 messages, 2 authors, last reply 4h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help