From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH 5/5] USB: OTG: msm: Add PHY suspend support for MSM8960 Date: Thu, 28 Apr 2011 18:49:45 +0400 Message-ID: <4DB97E89.9010206@ru.mvista.com> References: <1303977693-18389-1-git-send-email-pkondeti@codeaurora.org> <1303977693-18389-5-git-send-email-pkondeti@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:43928 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932429Ab1D1Ovp (ORCPT ); Thu, 28 Apr 2011 10:51:45 -0400 In-Reply-To: <1303977693-18389-5-git-send-email-pkondeti@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Pavankumar Kondeti Cc: greg@kroah.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org Hello. Pavankumar Kondeti wrote: > Signed-off-by: Pavankumar Kondeti [...] > diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c > index 425418d..fe040a2 100644 > --- a/drivers/usb/otg/msm_otg.c > +++ b/drivers/usb/otg/msm_otg.c > @@ -167,6 +167,32 @@ put_3p3: > return rc; > } > > +#ifdef CONFIG_PM_SLEEP > +static int usb_phy_susp_dig_vol = 500000; What's the point of making this variable? It doesn't seem to be changed anywhere... > @@ -489,6 +516,10 @@ static int msm_otg_suspend(struct msm_otg *motg) > */ > writel(readl(USB_USBCMD) | ASYNC_INTR_CTRL | ULPI_STP_CTRL, USB_USBCMD); > > + if (motg->pdata->phy_type == SNPS_28NM_INTEGRATED_PHY && > + motg->pdata->phy_type == OTG_PMIC_CONTROL) This is never true, I guess. Did you mean || ISO &&? > + writel(readl(USB_PHY_CTRL) | PHY_RETEN, USB_PHY_CTRL); > + > clk_disable(motg->pclk); > clk_disable(motg->clk); > if (motg->core_clk) > @@ -497,6 +528,12 @@ static int msm_otg_suspend(struct msm_otg *motg) > if (!IS_ERR(motg->pclk_src)) > clk_disable(motg->pclk_src); > > + if (motg->pdata->phy_type == SNPS_28NM_INTEGRATED_PHY && > + motg->pdata->phy_type == OTG_PMIC_CONTROL) { This is never true either... > + msm_hsusb_ldo_enable(0); > + msm_hsusb_config_vddcx(0); > + } > + > if (device_may_wakeup(otg->dev)) > enable_irq_wake(motg->irq); > if (bus) > @@ -527,6 +564,13 @@ static int msm_otg_resume(struct msm_otg *motg) > if (motg->core_clk) > clk_enable(motg->core_clk); > > + if (motg->pdata->phy_type == SNPS_28NM_INTEGRATED_PHY && > + motg->pdata->phy_type == OTG_PMIC_CONTROL) { Neither is this one... WBR, Sergei