]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: ehci-mx6: remove unnecessary regulator enable from probe
authorTim Harvey <tharvey@gateworks.com>
Fri, 19 May 2023 18:58:54 +0000 (11:58 -0700)
committerMarek Vasut <marex@denx.de>
Fri, 21 Jul 2023 00:05:10 +0000 (02:05 +0200)
Remove the regulator_set_enable() call from device probe which
resolves a regulator imbalance. This is unnecessary as
regulator_set_enable() will be called when ehci_register calls the
init_after_reset hook.

Suggested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
drivers/usb/host/ehci-mx6.c

index fae20838c60aff8c49b419041a270a255ef99339..a9ed5e7a0d53cd6ac5f786c973aafc703da5b84b 100644 (file)
@@ -709,18 +709,6 @@ static int ehci_usb_probe(struct udevice *dev)
                goto err_regulator;
 #endif
 
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
-       if (priv->vbus_supply) {
-               ret = regulator_set_enable(priv->vbus_supply,
-                                          (type == USB_INIT_DEVICE) ?
-                                          false : true);
-               if (ret && ret != -ENOSYS) {
-                       printf("Error enabling VBUS supply (ret=%i)\n", ret);
-                       goto err_clk;
-               }
-       }
-#endif
-
        if (priv->init_type == USB_INIT_HOST) {
                setbits_le32(&ehci->usbmode, CM_HOST);
                writel(mx6_portsc(priv->phy_type), &ehci->portsc);
@@ -744,10 +732,6 @@ err_phy:
        generic_shutdown_phy(&priv->phy);
 err_regulator:
 #endif
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
-       if (priv->vbus_supply)
-               regulator_set_enable(priv->vbus_supply, false);
-#endif
 err_clk:
 #if CONFIG_IS_ENABLED(CLK)
        clk_disable(&priv->clk);