From: Ye Li Date: Thu, 28 Mar 2024 10:57:59 +0000 (+0800) Subject: net: fec_mxc: Avoid enable regulator failure X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=9dc7d5270beb4be24395deefd52f245441780959;p=u-boot.git 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 --- diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index ac937676f9..90af18f80a 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;