From: sbabic at denx.de Date: Sat, 16 Feb 2019 10:35:56 +0000 (UTC) Subject: [U-Boot] net: dm: fec: Fix regulator enable when using DM_REGULATOR In-Reply-To: <20190115172648.32119-1-aford173@gmail.com> Message-ID: <20190216103728.28582C21EAE@lists.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > When DM_REGULATOR is enabled, the driver attempts to call > regulator_autoset() which expects the regulators to be on at boot > and/or always on and fails if they are not true. > For a more generic approach, this patch just calls > regulator_set_enable() which shouldn't have such restrictions. > Fixes: ad8c43cbcafb ("net: dm: fec: Support the phy-supply > binding") > Signed-off-by: Adam Ford > Tested-by: Martin Fuzzey > Acked-by: Joe Hershberger > diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c > index 32fb34b793..e924ddeb6d 100644 > --- a/drivers/net/fec_mxc.c > +++ b/drivers/net/fec_mxc.c > @@ -1327,7 +1327,7 @@ static int fecmxc_probe(struct udevice *dev) > > #ifdef CONFIG_DM_REGULATOR > if (priv->phy_supply) { > - ret = regulator_autoset(priv->phy_supply); > + ret = regulator_set_enable(priv->phy_supply, true); > if (ret) { > printf("%s: Error enabling phy supply\n", dev->name); > return ret; Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================