]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: fec_mxc: Avoid enable regulator failure
authorYe Li <ye.li@nxp.com>
Thu, 28 Mar 2024 10:57:59 +0000 (18:57 +0800)
committerFabio Estevam <festevam@gmail.com>
Sat, 30 Mar 2024 18:12:00 +0000 (15:12 -0300)
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>
drivers/net/fec_mxc.c

index ac937676f9c11e6f167737d61591631a126ce592..90af18f80a88caf4512f1c5f2817bd2460d2ef4d 100644 (file)
@@ -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;