From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72733C433F5 for ; Tue, 22 Mar 2022 08:36:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231354AbiCVIiE (ORCPT ); Tue, 22 Mar 2022 04:38:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231370AbiCVIhv (ORCPT ); Tue, 22 Mar 2022 04:37:51 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E25A6A425; Tue, 22 Mar 2022 01:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1647938183; x=1679474183; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=MLCHjvjC7DXa1W6IGRIWN8bCkLHwxY4LHy2UaTCMmBM=; b=zp4KdkDbWQ9+do98AxpmRZZnjTUTtcez9rKT+17iUI1Ktm6TY7nxfFV+ P8nt+NLMWmnfMA+KCe6V/n07ezgia03GzAJ/qtxiotY3DUYh5zYmZ4Q0U rUlDQjPWSBwEWmzxrRvAvq4y+O9bBroQhhoj8MrIoei7TrR6MvnpcreaV k=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-02.qualcomm.com with ESMTP; 22 Mar 2022 01:36:23 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2022 01:36:22 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 22 Mar 2022 01:36:22 -0700 Received: from hu-pkondeti-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 22 Mar 2022 01:36:18 -0700 Date: Tue, 22 Mar 2022 14:06:14 +0530 From: Pavan Kondeti To: Sandeep Maheswaram CC: Bjorn Andersson , Greg Kroah-Hartman , Felipe Balbi , Stephen Boyd , Doug Anderson , "Matthias Kaehlcke" , Mathias Nyman , , , , , Subject: Re: [PATCH v11 4/5] usb: dwc3: qcom: Configure wakeup interrupts during suspend Message-ID: <20220322083614.GL23316@hu-pkondeti-hyd.qualcomm.com> References: <1647932876-23249-1-git-send-email-quic_c_sanm@quicinc.com> <1647932876-23249-5-git-send-email-quic_c_sanm@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1647932876-23249-5-git-send-email-quic_c_sanm@quicinc.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sandeep, On Tue, Mar 22, 2022 at 12:37:55PM +0530, Sandeep Maheswaram wrote: > Configure interrupts based on hs_phy_mode to avoid triggering of > interrupts during system suspend and suspend the device successfully. > The changelog is not clear and confusing. Can you elaborate please? > Signed-off-by: Sandeep Maheswaram > Reviewed-by: Matthias Kaehlcke > --- > drivers/usb/dwc3/dwc3-qcom.c | 26 ++++++++++++++++++++------ > 1 file changed, 20 insertions(+), 6 deletions(-) > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c > index 7352124..9804a19 100644 > --- a/drivers/usb/dwc3/dwc3-qcom.c > +++ b/drivers/usb/dwc3/dwc3-qcom.c > @@ -316,22 +316,36 @@ static void dwc3_qcom_disable_wakeup_irq(int irq) > > static void dwc3_qcom_disable_interrupts(struct dwc3_qcom *qcom) > { > - dwc3_qcom_disable_wakeup_irq(qcom->hs_phy_irq); > + struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3); > > - dwc3_qcom_disable_wakeup_irq(qcom->dp_hs_phy_irq); > + dwc3_qcom_disable_wakeup_irq(qcom->hs_phy_irq); > > - dwc3_qcom_disable_wakeup_irq(qcom->dm_hs_phy_irq); > + if (dwc->hs_phy_mode & PHY_MODE_USB_HOST_LS) { > + dwc3_qcom_disable_wakeup_irq(qcom->dp_hs_phy_irq); > + } else if (dwc->hs_phy_mode & PHY_MODE_USB_HOST_HS) { > + dwc3_qcom_disable_wakeup_irq(qcom->dm_hs_phy_irq); > + } else { > + dwc3_qcom_disable_wakeup_irq(qcom->dp_hs_phy_irq); > + dwc3_qcom_disable_wakeup_irq(qcom->dm_hs_phy_irq); > + } Thanks, Pavan