All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: fec_mxc: Avoid enable regulator failure
@ 2024-03-28 10:57 Ye Li
  2024-03-30 19:52 ` Fabio Estevam
  0 siblings, 1 reply; 2+ messages in thread
From: Ye Li @ 2024-03-28 10:57 UTC (permalink / raw
  To: sbabic, u-boot, festevam, peng.fan; +Cc: uboot-imx, 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 <ye.li@nxp.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: fec_mxc: Avoid enable regulator failure
  2024-03-28 10:57 [PATCH] net: fec_mxc: Avoid enable regulator failure Ye Li
@ 2024-03-30 19:52 ` Fabio Estevam
  0 siblings, 0 replies; 2+ messages in thread
From: Fabio Estevam @ 2024-03-30 19:52 UTC (permalink / raw
  To: Ye Li; +Cc: sbabic, u-boot, peng.fan, uboot-imx, ye.li

On Thu, Mar 28, 2024 at 7:58 AM Ye Li <ye.li@nxp.com> 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 <ye.li@nxp.com>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-30 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-28 10:57 [PATCH] net: fec_mxc: Avoid enable regulator failure Ye Li
2024-03-30 19:52 ` Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.