Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2803056pxb; Mon, 17 Jan 2022 06:09:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5h6X457tZJkAZgTweib7ul7NZ7vswND4FyGAXX70YfjQvRGLaKhEdrQGPs55FVqZiyy+S X-Received: by 2002:a17:90a:9d81:: with SMTP id k1mr24951302pjp.129.1642428549570; Mon, 17 Jan 2022 06:09:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642428549; cv=none; d=google.com; s=arc-20160816; b=x54RKF13ml2fobsk/lSNMcS6HBWwfOc8LgiuMxncDzXLYTfmf4yUUP3GrEYXEveKv8 0KMOKReDLZP0uD0jfD5+1BvhCUe9UneTGy61fwzurtbcmkp0dbWT2zdZqyV8B49NMd0H G78LvWPTV8qjeNxYYc5cvM5WeInZ427riLqLtwu4pw9GOUwA3QgHL9xcwREMvyDplKEQ RwEBxmOnYM9ZihmZqrozmsVweOCFL/PG3rkVds1qaImHlHSu7nME+C/zNCrMop1MVXOp wPXpDh+mmuC8QqCunPam+JaJH2rxDd0nqZUhuBdsq5MTARzy5dTykvEUQIei1VCVnaSy CA8g== 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=5yVgU9EVxE9GEBX+xGWh+yY4Ybpo0uRO2KedqJ9IQao=; b=TktdsUiyoGEFiyHib+22AQ1IjbdQoXzcyd+B/c3Q+L3ISMnYmKlr+1BsP91oiu0Exl wzKQusSYPYqNWeuW3G/8YAWm6uhj9E70iUsabbVtq6pvleSy55ZqPyQZ0Jkm2+o+zEx/ Y7okKEaJstDXE8T31L/G84uKNxyaimTJRHMBX5Gyvl43L2J+Y+5d1c3Pj4vChuxmW+kP VlgKYek4zZ1Kjbe3L782GI+DcvCM7aQvV2N0/fco3PsL56y7IrOi9fJ26AZownvcckID lNJlv3+Na7aSoRpGJJC1F4BJFi/tK4pyb9391zQzQzKPUWitdnPlbgl5QIHfjTtEDJvm jKZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=LfaPMV76; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si17155624plh.345.2022.01.17.06.08.55; Mon, 17 Jan 2022 06:09:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=LfaPMV76; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234397AbiAQFox (ORCPT + 99 others); Mon, 17 Jan 2022 00:44:53 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:53011 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234330AbiAQFos (ORCPT ); Mon, 17 Jan 2022 00:44:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1642398288; x=1673934288; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=5yVgU9EVxE9GEBX+xGWh+yY4Ybpo0uRO2KedqJ9IQao=; b=LfaPMV76dqaBOyLfVAglw9AkKsq0sguT4aZNOYsFr5/0Y6gEuQubVK28 H+EUqROmLJPjtPrQMEanOw8v+12v6hYnokz9n7JePfPeYoHWBWNeAn7il +5Rdm0hJNZslnQNKyB7b6aBGAYWLPiyEyZvd5+NrO0iD9MbM7iBp1FLWS 8=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 16 Jan 2022 21:44:48 -0800 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; 16 Jan 2022 21:44:48 -0800 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.922.19; Sun, 16 Jan 2022 21:44:47 -0800 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.922.19; Sun, 16 Jan 2022 21:44:43 -0800 From: Sandeep Maheswaram To: Greg Kroah-Hartman , Felipe Balbi , Stephen Boyd , Doug Anderson , Matthias Kaehlcke , Mathias Nyman CC: , , , , , Sandeep Maheswaram Subject: [PATCH v10 5/6] usb: dwc3: qcom: Keep power domain on to retain controller status Date: Mon, 17 Jan 2022 11:14:07 +0530 Message-ID: <1642398248-21753-6-git-send-email-quic_c_sanm@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1642398248-21753-1-git-send-email-quic_c_sanm@quicinc.com> References: <1642398248-21753-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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Keep the power domain on in order to retail 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 b13e542..54dc3d3 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 @@ -710,6 +711,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) @@ -718,6 +720,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) { @@ -825,6 +829,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