Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2674014pxp; Tue, 22 Mar 2022 03:52:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvjKlcTXDLqYoV6F6+JL4vS1h0e0bNrRwtKVHbGAzQg1ath9AvCCWluXMC8ldNL/tbMNX1 X-Received: by 2002:a17:906:7942:b0:6da:bdb1:3388 with SMTP id l2-20020a170906794200b006dabdb13388mr24693278ejo.236.1647946352978; Tue, 22 Mar 2022 03:52:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647946352; cv=none; d=google.com; s=arc-20160816; b=CAPM4l6sufyH+B0vht5AlGSsfiWiyXOwpZMiYWe0yCMrmzK3nJ0CjQDzBvzlQ+Ns1l RU224LEKwI8COyuzNI7GFX2rKGFI5npny7u8D8mLTZj4W8oIk93ufFb+P+ae8Y8Zc+mO xeZNLqByoexFLX8Ygop4aokJDyyGS/8IYSuDX434OkAnwK8UFlXHFy8bbJ82g9Sw+MM1 BobWTe+yO6c7yteKP+qMwnCqrGxmLFtC5NtTrkgSHaqJXFYIRV9eOaWZlPeFlYrrtNQ7 fs9TNlfuvyd6VneTnoegRHLRcJctzvIQUV5SFYXSkybhddZR+v4+uOojqiI/Fo2/KJSD GJLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=Rly8mZJAFHEF+4EMimHKbhSMe6go9DJs07iIKO9zYS8=; b=FzSCq+rdcQ6kXMM4KevLh9InFU73MTVy0C5EZIOXWuknH3djOm9eBJ4t9ud4SEehVo 01vrz0GYxSyRH4VEaJY9nlPpxXHCjgf1a2ZuzMVnLckMGIcZf+CQBA3+mvCRRIKq0zED UhnSQX0MWWNlMH8qUUNJCNkYxmFPxeOK6D9UVOYSk7KbrPZp4GLoZncvWC3zx5Of0yjb 47H12wledxxgP9Vpf1DGw8wzYh4N4MOiZKwXhD2smppPwAIX8J/RIe1dB0xAVFBX0CVJ Z67Q1dZfSfD7c2s9JeaG5w1Ms/vsIStF/Ilg/DWyJn0u09JXVoO/p4sM2AJ1MFU4hHBf rzhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=D4cELLvN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a1709063a5500b006df76385d4csi8852069ejf.492.2022.03.22.03.52.07; Tue, 22 Mar 2022 03:52:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=D4cELLvN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232450AbiCVJUO (ORCPT + 99 others); Tue, 22 Mar 2022 05:20:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231328AbiCVJUN (ORCPT ); Tue, 22 Mar 2022 05:20:13 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D89211164; Tue, 22 Mar 2022 02:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1647940724; x=1679476724; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=Rly8mZJAFHEF+4EMimHKbhSMe6go9DJs07iIKO9zYS8=; b=D4cELLvNzg7DUnWmDG1afPqz+myOpjW5fZZEirKWmSxfg7NT447yTy57 uhznJD2InsO0TSlRwKGlcnD3SXn1PXlENyOXSappnCJgZSs5+Tq5lkq63 YR1P8d+AVy+/ZZHZdJHGXxiYqpDHLPJweWzbPSU9J+vjR+fIbd6mNzK5y c=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-01.qualcomm.com with ESMTP; 22 Mar 2022 02:18:42 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2022 02:18:41 -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 02:18:41 -0700 Received: from [10.216.35.109] (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 02:18:36 -0700 Subject: Re: [PATCH v11 5/5] usb: dwc3: qcom: Keep power domain on to retain controller status To: Pavan Kondeti CC: Bjorn Andersson , Greg Kroah-Hartman , Felipe Balbi , Stephen Boyd , Doug Anderson , "Matthias Kaehlcke" , Mathias Nyman , , , , References: <1647932876-23249-1-git-send-email-quic_c_sanm@quicinc.com> <1647932876-23249-6-git-send-email-quic_c_sanm@quicinc.com> <20220322083738.GM23316@hu-pkondeti-hyd.qualcomm.com> From: "Sandeep Maheswaram (Temp)" Message-ID: <982fdf9c-58a9-9a67-15e9-ff47b6ff1c93@quicinc.com> Date: Tue, 22 Mar 2022 14:48:32 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.1 MIME-Version: 1.0 In-Reply-To: <20220322083738.GM23316@hu-pkondeti-hyd.qualcomm.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US 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) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pavan, On 3/22/2022 2:07 PM, Pavan Kondeti wrote: > Hi Sandeep, > > On Tue, Mar 22, 2022 at 12:37:56PM +0530, Sandeep Maheswaram wrote: >> Keep the power domain on in order to retail controller status and >> to support wakeup from devices. >> > %s/retail/retain > > retain the controller status so that remote wakeup / device connect / > device disconnect events can be detected during suspend. Will correct in next version. > >> Signed-off-by: Sandeep Maheswaram >> --- >> drivers/usb/dwc3/dwc3-qcom.c | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c >> index 9804a19..35087cf 100644 >> --- a/drivers/usb/dwc3/dwc3-qcom.c >> +++ b/drivers/usb/dwc3/dwc3-qcom.c >> @@ -17,6 +17,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -724,6 +725,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev) >> struct resource *res, *parent_res = NULL; >> int ret, i; >> bool ignore_pipe_clk; >> + struct generic_pm_domain *genpd; >> >> qcom = devm_kzalloc(&pdev->dev, sizeof(*qcom), GFP_KERNEL); >> if (!qcom) >> @@ -732,6 +734,8 @@ static int dwc3_qcom_probe(struct platform_device *pdev) >> platform_set_drvdata(pdev, qcom); >> qcom->dev = &pdev->dev; >> >> + genpd = pd_to_genpd(qcom->dev->pm_domain); >> + >> if (has_acpi_companion(dev)) { >> qcom->acpi_pdata = acpi_device_get_match_data(dev); >> if (!qcom->acpi_pdata) { >> @@ -839,6 +843,8 @@ static int dwc3_qcom_probe(struct platform_device *pdev) >> if (ret) >> goto interconnect_exit; >> >> + genpd->flags |= GENPD_FLAG_ALWAYS_ON; >> + >> device_init_wakeup(&pdev->dev, 1); >> qcom->is_suspended = false; >> pm_runtime_set_active(dev); >> -- >> 2.7.4 >> > Thanks, > Pavan