netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fec: Use gpio_set_value_cansleep()
@ 2015-10-28 12:20 Fabio Estevam
  2015-11-01 17:03 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2015-10-28 12:20 UTC (permalink / raw)
  To: davem; +Cc: netdev, Fabio Estevam

From: Fabio Estevam <fabio.estevam@freescale.com>

We are in a context where we can sleep, and the FEC PHY reset gpio
may be on an I2C expander. Use the cansleep() variant when
setting the GPIO value.

Based on a patch from Russell King for pci-mvebu.c.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/net/ethernet/freescale/fec_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 501e143..b2a3220 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3261,7 +3261,7 @@ static void fec_reset_phy(struct platform_device *pdev)
 		return;
 	}
 	msleep(msec);
-	gpio_set_value(phy_reset, 1);
+	gpio_set_value_cansleep(phy_reset, 1);
 }
 #else /* CONFIG_OF */
 static void fec_reset_phy(struct platform_device *pdev)
-- 
1.9.1

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

* Re: [PATCH] fec: Use gpio_set_value_cansleep()
  2015-10-28 12:20 [PATCH] fec: Use gpio_set_value_cansleep() Fabio Estevam
@ 2015-11-01 17:03 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-11-01 17:03 UTC (permalink / raw)
  To: festevam; +Cc: netdev, fabio.estevam

From: Fabio Estevam <festevam@gmail.com>
Date: Wed, 28 Oct 2015 10:20:30 -0200

> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> We are in a context where we can sleep, and the FEC PHY reset gpio
> may be on an I2C expander. Use the cansleep() variant when
> setting the GPIO value.
> 
> Based on a patch from Russell King for pci-mvebu.c.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Applied.

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

end of thread, other threads:[~2015-11-01 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-28 12:20 [PATCH] fec: Use gpio_set_value_cansleep() Fabio Estevam
2015-11-01 17:03 ` 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).