Skip to content

Commit

Permalink
net: stmmac: dwmac-sun8i: fix allwinner,leds-active-low handling
Browse files Browse the repository at this point in the history
The driver expect "allwinner,leds-active-low" to be in PHY node, but
the binding doc expect it to be in MAC node.

Since all board DT use it also in MAC node, the driver need to search
allwinner,leds-active-low in MAC node.

Signed-off-by: Corentin Labbe <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
montjoie authored and davem330 committed Nov 30, 2017
1 parent f8821f9 commit 1c08ac0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,8 +808,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
val, reg);

if (gmac->variant->soc_has_internal_phy) {
if (of_property_read_bool(priv->plat->phy_node,
"allwinner,leds-active-low"))
if (of_property_read_bool(node, "allwinner,leds-active-low"))
reg |= H3_EPHY_LED_POL;
else
reg &= ~H3_EPHY_LED_POL;
Expand Down

0 comments on commit 1c08ac0

Please sign in to comment.