net: dm: fec: Fix regulator enable when using DM_REGULATOR
PATCH 1/1 net: dm: fec: Fix regulator enable when using DM_REGULATOR
When DM_REGULATOR is enabled, the driver attempts to call regulator_autoset() which expects the regulators to be on at boot and/or always on and fails if they are not true.
For a more generic approach, this patch just calls regulator_set_enable() which shouldn't have such restrictions.
binding")
drivers/net/fec_mxc.c +1 -1
@@ -1327,7 +1327,7 @@ static int fecmxc_probe(struct udevice *dev)#ifdef CONFIG_DM_REGULATOR if (priv->phy_supply) { - ret =regulator_autoset (priv->phy_supply); + ret =regulator_set_enable (priv->phy_supply, true);if (ret) {printf ("%s: Error enabling phy supply\n" , dev->name);return ret;
Signature · 1 line
2.17.1
PATCH 1/1 net: dm: fec: Fix regulator enable when using DM_REGULATOR
Hi Adam,
Quoted 16 lines · Adam Ford
When
DM_REGULATORis enabled, the driver attempts to callregulator_autoset()which expects the regulators to be on at boot and/or always on and fails if they are not true.
For a more generic approach, this patch just callsregulator_set_enable()which shouldn't have such restrictions.Fixes ad8c43cbcafb ("net: dm: fec: Support the phy-supplybinding")
Signed-off-by Adam Ford <[email protected]>drivers/net/fec_mxc.c +0
-0
drivers/net/fec_mxc.c static int fecmxc_probe(struct udevice *dev) · line 1333
Quoted 8 lines
drivers/net/fec_mxc.c +1
-1@@ -1327,7 +1327,7 @@ static int fecmxc_probe(struct udevice *dev)#ifdef CONFIG_DM_REGULATOR if (priv->phy_supply) { - ret =regulator_autoset (priv->phy_supply); + ret =regulator_set_enable (priv->phy_supply, true);if (ret) {printf ("%s: Error enabling phy supply\n" , dev->name);return ret;
Thanks for fixing this.
Regards,
Martin
PATCH 1/1 net: dm: fec: Fix regulator enable when using DM_REGULATOR
In reply to Adam FordQuoted 11 lines · Adam Ford
When
DM_REGULATORis enabled, the driver attempts to callregulator_autoset()which expects the regulators to be on at boot and/or always on and fails if they are not true.
For a more generic approach, this patch just callsregulator_set_enable()which shouldn't have such restrictions.Fixes ad8c43cbcafb ("net: dm: fec: Support the phy-supplybinding")
Signed-off-by Adam Ford <[email protected]>
Quoted 15 lines
When
DM_REGULATORis enabled, the driver attempts to callregulator_autoset()which expects the regulators to be on at boot and/or always on and fails if they are not true.
For a more generic approach, this patch just callsregulator_set_enable()which shouldn't have such restrictions.Fixes ad8c43cbcafb ("net: dm: fec: Support the phy-supplybinding")
Signed-off-by Adam Ford <[email protected]>Tested-by Martin Fuzzey <[email protected]>Acked-by Joe Hershberger <[email protected]>drivers/net/fec_mxc.c +0
-0
drivers/net/fec_mxc.c static int fecmxc_probe(struct udevice *dev) · line 1333
Quoted 8 lines
drivers/net/fec_mxc.c +1
-1@@ -1327,7 +1327,7 @@ static int fecmxc_probe(struct udevice *dev)#ifdef CONFIG_DM_REGULATOR if (priv->phy_supply) { - ret =regulator_autoset (priv->phy_supply); + ret =regulator_set_enable (priv->phy_supply, true);if (ret) {printf ("%s: Error enabling phy supply\n" , dev->name);return ret;
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================