netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 03/13] net: stmmac: dwmac-rk: Allow the driver to probe when phy-supply is not present
       [not found] <20181125211907.9895-1-otavio@ossystems.com.br>
@ 2018-11-25 21:18 ` Otavio Salvador
  2018-11-25 21:18 ` [PATCH 04/13] net: stmmac: dwmac-rk: Do not print redundant error message Otavio Salvador
  2018-11-25 21:18 ` [PATCH 05/13] net: stmmac: dwmac-rk: Do not print error when PHY regulator is not found Otavio Salvador
  2 siblings, 0 replies; 3+ messages in thread
From: Otavio Salvador @ 2018-11-25 21:18 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, linux-rockchip
  Cc: Otavio Salvador, Jose Abreu, Giuseppe Cavallaro, netdev,
	Alexandre Torgue, Maxime Coquelin, linux-stm32, David S. Miller

The phy-supply is an optional regulator, so we should not treat
as an error when phy-supply is not passed in the device tree.

This allows the dwmac-rk driver to probe when phy-supply is not
present in the dts.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 7b923362ee55..73855622445b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1205,7 +1205,7 @@ static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable)
 
 	if (!ldo) {
 		dev_err(dev, "no regulator found\n");
-		return -1;
+		return 0;
 	}
 
 	if (enable) {
-- 
2.19.1

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

* [PATCH 04/13] net: stmmac: dwmac-rk: Do not print redundant error message
       [not found] <20181125211907.9895-1-otavio@ossystems.com.br>
  2018-11-25 21:18 ` [PATCH 03/13] net: stmmac: dwmac-rk: Allow the driver to probe when phy-supply is not present Otavio Salvador
@ 2018-11-25 21:18 ` Otavio Salvador
  2018-11-25 21:18 ` [PATCH 05/13] net: stmmac: dwmac-rk: Do not print error when PHY regulator is not found Otavio Salvador
  2 siblings, 0 replies; 3+ messages in thread
From: Otavio Salvador @ 2018-11-25 21:18 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, linux-rockchip
  Cc: Otavio Salvador, Fabio Berton, Jose Abreu, Giuseppe Cavallaro,
	netdev, Alexandre Torgue, Maxime Coquelin, linux-stm32,
	David S. Miller

rk_gmac_setup() already prints a message saying that the PHY regulator
is not found, so we should not print it again.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
---

 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 73855622445b..c895a9a6939a 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1203,10 +1203,8 @@ static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable)
 	int ret;
 	struct device *dev = &bsp_priv->pdev->dev;
 
-	if (!ldo) {
-		dev_err(dev, "no regulator found\n");
+	if (!ldo)
 		return 0;
-	}
 
 	if (enable) {
 		ret = regulator_enable(ldo);
-- 
2.19.1

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

* [PATCH 05/13] net: stmmac: dwmac-rk: Do not print error when PHY regulator is not found
       [not found] <20181125211907.9895-1-otavio@ossystems.com.br>
  2018-11-25 21:18 ` [PATCH 03/13] net: stmmac: dwmac-rk: Allow the driver to probe when phy-supply is not present Otavio Salvador
  2018-11-25 21:18 ` [PATCH 04/13] net: stmmac: dwmac-rk: Do not print redundant error message Otavio Salvador
@ 2018-11-25 21:18 ` Otavio Salvador
  2 siblings, 0 replies; 3+ messages in thread
From: Otavio Salvador @ 2018-11-25 21:18 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, linux-rockchip
  Cc: Otavio Salvador, Fabio Berton, Jose Abreu, Giuseppe Cavallaro,
	netdev, Alexandre Torgue, Maxime Coquelin, linux-stm32,
	David S. Miller

The PHY regulator is optional, so when it is not present move the message
level from error to debug, which is more appropriate.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
---

 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index c895a9a6939a..6b4ea95a30e0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -1242,7 +1242,7 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev,
 			dev_err(dev, "phy regulator is not available yet, deferred probing\n");
 			return ERR_PTR(-EPROBE_DEFER);
 		}
-		dev_err(dev, "no regulator found\n");
+		dev_dbg(dev, "no regulator found\n");
 		bsp_priv->regulator = NULL;
 	}
 
-- 
2.19.1

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

end of thread, other threads:[~2018-11-26  8:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20181125211907.9895-1-otavio@ossystems.com.br>
2018-11-25 21:18 ` [PATCH 03/13] net: stmmac: dwmac-rk: Allow the driver to probe when phy-supply is not present Otavio Salvador
2018-11-25 21:18 ` [PATCH 04/13] net: stmmac: dwmac-rk: Do not print redundant error message Otavio Salvador
2018-11-25 21:18 ` [PATCH 05/13] net: stmmac: dwmac-rk: Do not print error when PHY regulator is not found Otavio Salvador

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).