Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2685644pxp; Tue, 22 Mar 2022 04:07:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP5nK3HZqL3jEaCNUqeyPdd1XaEkk1YKIkoJ9BRclfPg90jBxulm+aiTtko0obX8DyXfxm X-Received: by 2002:a17:906:6a1f:b0:6df:9189:7ac7 with SMTP id qw31-20020a1709066a1f00b006df91897ac7mr24747210ejc.727.1647947230561; Tue, 22 Mar 2022 04:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647947230; cv=none; d=google.com; s=arc-20160816; b=yp7OiUFouCXh3vNRopKDhNi9GVI4DtLWikozNZ9BjMfCpAaDkiTnBNTSJbCMsT+Ek2 401BSG1Qlrp8rSvnaFKzGLNm4ilpiM9P/GsEHCWSCx5JM8r3uRCn4atEeEZLzZpd43gP AHVKm1svffFQQ/YXxmnAYo1cEfVs2DSJCZUINiE2+Iy9kHoAcU9FnuWLB2ZE1x3O0rqE j1gdk+d8fKXlBrO9Bk4GxnxKoCb0E2sU4DNTGQf5D8Y5Jo/6GTMsnTB1jobEvkvDV58O V3iz/9uRQX7jY/+eYp12X3E3olTpPSF+MefGaS1qSKGVCUcup8NPzKd/Y5MIMsHzKqB6 HnKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ZRVHgPGEeoSIITIJqcFPK4jqYWVikFjVIYIZtlHhedY=; b=G5xYkprjyNyI0Fn9CmdaYHNjPxdexUbk/xn23+aj5+paPXlYit9JSv5jgShPXgxGMC k220jrWElfbHbO1qvwFVRPnGoOFWpH096BbgMlKrheScRZxT7qbwQR/QVG61DsvXiymy ODHBDHkWs8RQ6xwUhGXVBVzMFN8apSL9cqCXQCAReuCDk36THXeStxjHySOw99Ccabs8 ed6EkDX1uR4eCYjP40sclWpJWseY3Ci5xg4aDj9FYur5tQzLA2r+/iLymTb25faeXRWD fbL/xi3tVV053vTePLiylXVQAQloMR7w62sDwdT2zMsOFYTTVQaWvZRag78Ft0eyz8zk pKAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=xmYMwKMM; 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 hs38-20020a1709073ea600b006df76385c30si7216915ejc.208.2022.03.22.04.06.43; Tue, 22 Mar 2022 04:07:10 -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=xmYMwKMM; 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 S231387AbiCVIjT (ORCPT + 99 others); Tue, 22 Mar 2022 04:39:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231374AbiCVIjP (ORCPT ); Tue, 22 Mar 2022 04:39:15 -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 A82C46AA4D; Tue, 22 Mar 2022 01:37:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1647938268; x=1679474268; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ZRVHgPGEeoSIITIJqcFPK4jqYWVikFjVIYIZtlHhedY=; b=xmYMwKMMWEh2q3T6THgRU4u62FDpQlMr9IvWOJQOnOirWyPl4M7iS5O2 gq2gRnvrvKOf9dAbasRdPqIE01KqfFAXlmTJbWZF49jPDJ5yX/raC8Nrh hZ9PLB/+i46AqXXHma9pc0pT7hyOTpPU8LCqkDeHcCLilWCrrFIVB9tsv M=; 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:37:48 -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:37:47 -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:37:46 -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:37:42 -0700 Date: Tue, 22 Mar 2022 14:07:38 +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 5/5] usb: dwc3: qcom: Keep power domain on to retain controller status Message-ID: <20220322083738.GM23316@hu-pkondeti-hyd.qualcomm.com> References: <1647932876-23249-1-git-send-email-quic_c_sanm@quicinc.com> <1647932876-23249-6-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-6-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) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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. > 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