Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 39660C77B7A for ; Fri, 19 May 2023 18:59:06 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 883C085FA5; Fri, 19 May 2023 20:59:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 72C6886312; Fri, 19 May 2023 20:59:02 +0200 (CEST) Received: from finn.localdomain (finn.gateworks.com [108.161.129.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8FA8E85FA5 for ; Fri, 19 May 2023 20:58:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tharvey@gateworks.com Received: from 068-189-091-139.biz.spectrum.com ([68.189.91.139] helo=tharvey.pdc.gateworks.com) by finn.localdomain with esmtp (Exim 4.93) (envelope-from ) id 1q05JY-005Zfe-E2; Fri, 19 May 2023 18:58:56 +0000 From: Tim Harvey To: u-boot@lists.denx.de Cc: Fabio Estevam , Marek Vasut , Patrice Chotard , Eugen Hristev , Tim Harvey Subject: [PATCH] usb: ehci-mx6: remove unnecessary regulator enable from probe Date: Fri, 19 May 2023 11:58:54 -0700 Message-Id: <20230519185854.1013521-1-tharvey@gateworks.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean 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 Signed-off-by: Tim Harvey --- drivers/usb/host/ehci-mx6.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index fae20838c60a..a9ed5e7a0d53 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -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); -- 2.25.1