Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp68003pxh; Thu, 7 Apr 2022 14:12:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5EniDrEBLGPYiMABI3Ee40aejWLAiP1OWUx7a4ecIVa77wfRPVXdH1c7IIhddfNzPwO+U X-Received: by 2002:a63:5747:0:b0:381:54b9:b083 with SMTP id h7-20020a635747000000b0038154b9b083mr12625276pgm.178.1649365934527; Thu, 07 Apr 2022 14:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649365934; cv=none; d=google.com; s=arc-20160816; b=GFkuSmrSqcSMxtXCfeslcx51+g3hYP2YsrEID0ZAx2/fPrWhz2wg6cr41xP+ohDnHs zUTb/6R42psVYRZ0Q6nNXr5nL//cnRz562UP+07lLrZi4cZDeWylaGfpBxGPHAbNMn6B GbFbdUGHUebXxFBlb65rHQibjx/iF8Smhd9P1VonClUwd6nxDflmDHqcEcSQJZ0Ltkgp F4KGgsesyuII1m72Y7UqscKjlO4UcaWSGOnwsq2SbqrWv5FPp1W/1k+sXibWbyZppdlk iPC7tilF4n8Q4d16SnAqJMMhjyrJWedO076UAEdaun2OUu1QcQlE0sQMS1J0eloDWcBR pPqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ve2qRgYReSbfCaf4GJfgFbpxlrNt8Qjh7vSqdkLzY8A=; b=HqERKs3UoMBnl9yVVmQUTcSZ1ME+Fa1jWh4Poozwie1FDzwG77ZD9GfdNzOf5k2mxu IWvtjRfObEPw1xcNS7Q5O26jtxSxrnHZ2Kx8/Bv+yTaxJHohid0j80+Bx3C4RJjeZjER q/VpjZc+9gnDb3nMyv/p2yTi/RHVFydi/jGl+ZYzM2PbREOJCWz8HdfQMMGdAhSeAZXb TKgNHiwvsKUFblyqT1828HSV3OapLTJHz6GOO2jHCCmczb+Ux1EOapR2L53aOl3pYz56 FW0B0QCYpGf9/H3MxO9tNg+2iKP48rWB+tdw49mJnB+PtL3pbgwN5YQBsH1gweCjYgQK bVEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=uaL+Z4RK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k17-20020a63f011000000b003816043ef29si20098788pgh.286.2022.04.07.14.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 14:12:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=uaL+Z4RK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C18A64051CE; Thu, 7 Apr 2022 13:04:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243404AbiDGIsK (ORCPT + 99 others); Thu, 7 Apr 2022 04:48:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243330AbiDGIrq (ORCPT ); Thu, 7 Apr 2022 04:47:46 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9585194787; Thu, 7 Apr 2022 01:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1649321147; x=1680857147; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=ve2qRgYReSbfCaf4GJfgFbpxlrNt8Qjh7vSqdkLzY8A=; b=uaL+Z4RKusRxY68uXTxkBocKIUBdt6KHOyZW5F7T2FK9hhEp6HTp3vaP P4IWycj+277KwpYBmigCkNMfpPqfLPClu3o+oew4bojMYNpsihSrUVo3s tpM2jP+fBtvNpbRNze0BssBCeU5ZxgzLlP5cbcH5UA+AuX7qGiCzERkJn A=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 07 Apr 2022 01:45:46 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 01:45:46 -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; Thu, 7 Apr 2022 01:45:46 -0700 Received: from c-sanm-linux.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; Thu, 7 Apr 2022 01:45:40 -0700 From: Sandeep Maheswaram To: Rob Herring , Andy Gross , "Bjorn Andersson" , Greg Kroah-Hartman , Felipe Balbi , Stephen Boyd , Doug Anderson , "Matthias Kaehlcke" , Mathias Nyman , Krzysztof Kozlowski CC: , , , , , , , , Sandeep Maheswaram Subject: [PATCH v12 4/6] usb: dwc3: qcom: Keep power domain on to retain controller status Date: Thu, 7 Apr 2022 14:15:02 +0530 Message-ID: <1649321104-31322-5-git-send-email-quic_c_sanm@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1649321104-31322-1-git-send-email-quic_c_sanm@quicinc.com> References: <1649321104-31322-1-git-send-email-quic_c_sanm@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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 Keep the power domain on in order to retain controller status and to support wakeup from devices. 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