mirror of
https://github.com/andreili/SBC_builder.git
synced 2025-08-24 03:14:06 +02:00
82 lines
2.9 KiB
Diff
82 lines
2.9 KiB
Diff
From e75d0648a45ace112ac64688f87b05b23b8bb1c5 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
|
|
Date: Tue, 20 Aug 2019 14:29:29 +0200
|
|
Subject: net: stmmac: sun8i: Rename PHY regulator variable to regulator_phy
|
|
|
|
We'll be adding further optional regulators, and this makes it clearer
|
|
what the regulator is for.
|
|
|
|
Signed-off-by: Ondrej Jirman <megi@xff.cz>
|
|
---
|
|
.../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 18 +++++++++---------
|
|
1 file changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
|
index 7983df0d0eaa..9c2685cb72d2 100644
|
|
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
|
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
|
|
@@ -60,7 +60,7 @@ struct emac_variant {
|
|
|
|
/* struct sunxi_priv_data - hold all sunxi private data
|
|
* @ephy_clk: reference to the optional EPHY clock for the internal PHY
|
|
- * @regulator: reference to the optional regulator
|
|
+ * @regulator_phy: reference to the optional regulator
|
|
* @rst_ephy: reference to the optional EPHY reset for the internal PHY
|
|
* @variant: reference to the current board variant
|
|
* @regmap: regmap for using the syscon
|
|
@@ -70,7 +70,7 @@ struct emac_variant {
|
|
*/
|
|
struct sunxi_priv_data {
|
|
struct clk *ephy_clk;
|
|
- struct regulator *regulator;
|
|
+ struct regulator *regulator_phy;
|
|
struct reset_control *rst_ephy;
|
|
const struct emac_variant *variant;
|
|
struct regmap_field *regmap_field;
|
|
@@ -588,9 +588,9 @@ static int sun8i_dwmac_init(struct platform_device *pdev, void *priv)
|
|
struct sunxi_priv_data *gmac = priv;
|
|
int ret;
|
|
|
|
- ret = regulator_enable(gmac->regulator);
|
|
+ ret = regulator_enable(gmac->regulator_phy);
|
|
if (ret) {
|
|
- dev_err(&pdev->dev, "Fail to enable regulator\n");
|
|
+ dev_err(&pdev->dev, "Fail to enable PHY regulator\n");
|
|
return ret;
|
|
}
|
|
|
|
@@ -603,7 +603,7 @@ static int sun8i_dwmac_init(struct platform_device *pdev, void *priv)
|
|
return 0;
|
|
|
|
err_disable_regulator:
|
|
- regulator_disable(gmac->regulator);
|
|
+ regulator_disable(gmac->regulator_phy);
|
|
|
|
return ret;
|
|
}
|
|
@@ -1048,7 +1048,7 @@ static void sun8i_dwmac_exit(struct platform_device *pdev, void *priv)
|
|
if (gmac->variant->soc_has_internal_phy)
|
|
sun8i_dwmac_unpower_internal_phy(gmac);
|
|
|
|
- regulator_disable(gmac->regulator);
|
|
+ regulator_disable(gmac->regulator_phy);
|
|
}
|
|
|
|
static void sun8i_dwmac_set_mac_loopback(void __iomem *ioaddr, bool enable)
|
|
@@ -1172,9 +1172,9 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
|
|
}
|
|
|
|
/* Optional regulator for PHY */
|
|
- gmac->regulator = devm_regulator_get(dev, "phy");
|
|
- if (IS_ERR(gmac->regulator))
|
|
- return dev_err_probe(dev, PTR_ERR(gmac->regulator),
|
|
+ gmac->regulator_phy = devm_regulator_get(dev, "phy");
|
|
+ if (IS_ERR(gmac->regulator_phy))
|
|
+ return dev_err_probe(dev, PTR_ERR(gmac->regulator_phy),
|
|
"Failed to get PHY regulator\n");
|
|
|
|
/* The "GMAC clock control" register might be located in the
|
|
--
|
|
2.35.3
|
|
|