netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: stmmac: dwmac-sun8i: fix allwinner,leds-active-low handling
@ 2017-11-28 16:48 Corentin Labbe
       [not found] ` <20171128164822.29218-1-clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Corentin Labbe @ 2017-11-28 16:48 UTC (permalink / raw)
  To: alexandre.torgue-qxv4g6HH51o,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	peppe.cavallaro-qxv4g6HH51o, wens-jdAy2FN1RRM
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw,
	Corentin Labbe

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 <clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index e5ff734d4f9b..9eb7f65d8000 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -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;
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-11-30 14:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-28 16:48 [PATCH] net: stmmac: dwmac-sun8i: fix allwinner,leds-active-low handling Corentin Labbe
     [not found] ` <20171128164822.29218-1-clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-28 17:38   ` Andrew Lunn
     [not found]     ` <20171128173826.GE14512-g2DYL2Zd6BY@public.gmane.org>
2017-11-29  9:02       ` Corentin Labbe
2017-11-29 15:37         ` Andrew Lunn
     [not found]           ` <20171129153712.GA24881-g2DYL2Zd6BY@public.gmane.org>
2017-11-29 15:41             ` Chen-Yu Tsai
     [not found]               ` <CAGb2v67hv7ayH=F-MBG-PCCeVt43PH-O-6b3KOyGXSpr2s4DGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-29 15:46                 ` Andrew Lunn
     [not found]                   ` <20171129154649.GC24881-g2DYL2Zd6BY@public.gmane.org>
2017-11-29 15:50                     ` Chen-Yu Tsai
2017-11-29 15:47             ` Maxime Ripard
2017-11-30 14:45   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).