Skip to contentSkip to conversation

net: fec_mxc: Avoid enable regulator failure

PATCH In review Ye Li 2 participants 2 messages Mar 28, 2024 – Mar 30, 2024 Network drivers

lore
Share & tools
lore

Ye Li

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/fec_mxc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/fec_mxc.c +1 -1
index ac93767..90af18f 100644
@@ -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;
Signature · 1 line
2.7.4
#1 lore raw
Quoted 5 lines · Ye Li

Change to regulator_set_enable_if_allowed to avoid enable failure, in case same phy supply shared by multiple FEC controllers.

Applied to u-boot-imx/next, thanks.