diff options
author | Adam Ford <aford173@gmail.com> | 2019-01-15 11:26:48 -0600 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2019-11-27 17:40:45 +0100 |
commit | c83b609c61b6c2a32055ee8d06712691b35f0938 (patch) | |
tree | 9acaa8f1506e9c3ab970292dd5774bff95b886c5 | |
parent | c8452086984a3a5cbde37fcf449eb9128cbb6186 (diff) |
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.
Fixes: ad8c43cbcafb ("net: dm: fec: Support the phy-supply
binding")
Signed-off-by: Adam Ford <aford173@gmail.com>
Tested-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
(cherry picked from commit 8f1a5ac797baac5b40f93eac80a7810f0a771ecf)
-rw-r--r-- | drivers/net/fec_mxc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 10df6dda59..aa52027dc2 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1297,7 +1297,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; |