aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2024-03-28 18:57:59 +0800
committerFabio Estevam <festevam@gmail.com>2024-03-30 15:12:00 -0300
commit9dc7d5270beb4be24395deefd52f245441780959 (patch)
tree970ec8a63ddb494ba38ebce86ef28624976f0225
parent6cd789c7fd6274b28432caa145e4c857de04c016 (diff)
downloadu-boot-9dc7d5270beb4be24395deefd52f245441780959.zip
u-boot-9dc7d5270beb4be24395deefd52f245441780959.tar.gz
u-boot-9dc7d5270beb4be24395deefd52f245441780959.tar.bz2
net: fec_mxc: Avoid enable regulator failure
Change to regulator_set_enable_if_allowed to avoid enable failure, in case same phy supply shared by multiple FEC controllers. Signed-off-by: Ye Li <ye.li@nxp.com>
-rw-r--r--drivers/net/fec_mxc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index ac93767..90af18f 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1310,7 +1310,7 @@ static int fecmxc_probe(struct udevice *dev)
#ifdef CONFIG_DM_REGULATOR
if (priv->phy_supply) {
- ret = regulator_set_enable(priv->phy_supply, true);
+ ret = regulator_set_enable_if_allowed(priv->phy_supply, true);
if (ret) {
printf("%s: Error enabling phy supply\n", dev->name);
return ret;