Re: [PATCH] net: fec_mxc: Avoid enable regulator failure

2024-03-30 Thread Fabio Estevam
On Thu, Mar 28, 2024 at 7:58 AM Ye Li  wrote:
>
> 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 

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


[PATCH] net: fec_mxc: Avoid enable regulator failure

2024-03-28 Thread Ye Li
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 
---
 drivers/net/fec_mxc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.7.4