Skip to content

Commit 8a90cb9

Browse files
committed
net: phy: mediatek: 2p5ge: use dt-property for led polarity
1 parent a3b22c4 commit 8a90cb9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/phy/mediatek/mtk-2p5ge.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,10 +663,13 @@ static int mt798x_2p5ge_phy_probe(struct phy_device *phydev)
663663

664664
u16 polarity=MTK_PHY_LED_ON_POLARITY;
665665

666+
struct device_node *of_node = phydev->mdio.dev.of_node;
667+
if (of_property_read_bool(of_node, "active-low"))
668+
polarity=0;
669+
666670
switch (phydev->drv->phy_id) {
667671
case MTK_2P5GPHY_ID_MT7987:
668672
ret = mt7987_2p5ge_phy_load_fw(phydev);
669-
polarity=0;
670673
phy_set_bits_mmd(phydev, MDIO_MMD_VEND2, MTK_PHY_LED0_ON_CTRL,
671674
polarity);
672675
dev_err(&phydev->mdio.dev, "DEBUG: mt7987 detected!\n");

0 commit comments

Comments
 (0)