Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1149145pxb; Thu, 24 Mar 2022 13:48:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKwZ+sxgYkyb7B5wGoiqmVthYSN3UMTVwA9xs4FfvYhUPPUMD00ROiuRRu1ViBnm5kX/yC X-Received: by 2002:a17:90b:3850:b0:1c6:572e:f39a with SMTP id nl16-20020a17090b385000b001c6572ef39amr20534020pjb.233.1648154890673; Thu, 24 Mar 2022 13:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648154890; cv=none; d=google.com; s=arc-20160816; b=wgMpVIpGyuJDwnO0DLDuQvM3/fHCh07e6+iYyEjBkIOMi84zRiPa1G44w/8CSUGJqC 6iq0HfJr4nlHafnUEQybfcY6rbhPrf1Kapn8Bv7e9FopHrbnvg5MJQjcu7Xyo8ci5Rgw BF5VTEb1xkqn5gi8ylN5FRJrc9srOY0w6tWRKZ6bXLtrnUbRdbCq9KEniR7/B2EvZt2M fJ++cl5lLii4PHIghq9o9vBMmOqC7sOhrTXBHo87NYUsL/l087lllvCZ96EVM1KJrbdd AI5tCegNI5QNZtQjBu/U9Eft5Ad04MgGZ754C+3myW1XcZyA41c3FoUZPApT4npKFlhE q59A== 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=kaHDHzYnkeLY5hfEE/V9FOwVrbW8djaEM+Hu25ZuQpw=; b=Jd8G2WpY1DStPF0dgzel0UpkNfkKOakYAhubcBv1NsHAUuRPJr9BHzzuRqOYXSmoGV glBQ/cZfSbYFZzWCaHK7oHYB8/HSvfB5nbnl889iDRSUFSL2PONbgX+YnqDRzG8AWy/B yQ5JwUvZrCDYqvOuMdHIAl4TLjdVSOWxXucSrgEPCPw4B69m1i6WYKQi1yczNxyDn8Ow 7rC7ZWohhpMY3Ob7QqufqcXYm3yyYZpifWRoU+5DULNKe4CdAfAFos0vOqQPvD+2F3D1 IRzqVZ0a+o8/szBVWbqwraJDnxBQGZYl0yZqy/7quUAG7S3aWTFiglP8ZJJpVqwSdMbK QbJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=CvK8mSyA; 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 f13-20020a63554d000000b003816043efdasi397707pgm.463.2022.03.24.13.47.56; Thu, 24 Mar 2022 13:48: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=CvK8mSyA; 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 S1345841AbiCXGjU (ORCPT + 99 others); Thu, 24 Mar 2022 02:39:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348207AbiCXGjQ (ORCPT ); Thu, 24 Mar 2022 02:39:16 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D275972F9; Wed, 23 Mar 2022 23:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1648103864; x=1679639864; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=kaHDHzYnkeLY5hfEE/V9FOwVrbW8djaEM+Hu25ZuQpw=; b=CvK8mSyA9ah2LI83HDM22Vfp9JlCSKt4FvsijObXvS7wcIU1ais9891o gHYGhQJI1HSdYd+bb1bFhWnS/IC3VfFaBD+yUIVx9ZdrGVhfiRlPzoT7K oHDxM2Y8c1fiEr/5Tf+hWQNyTv7GS4f1cxsaACcz8+xE6YCMNloWrdPnd 8=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 23 Mar 2022 23:37:44 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2022 23:37:43 -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; Wed, 23 Mar 2022 23:37:43 -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; Wed, 23 Mar 2022 23:37:38 -0700 From: Sandeep Maheswaram To: Greg Kroah-Hartman , Felipe Balbi , Stephen Boyd , Doug Anderson , Matthias Kaehlcke , Mathias Nyman , Peter Chen , Pawel Laszczak , Roger Quadros , Aswath Govindraju CC: , , , , , Sandeep Maheswaram Subject: [PATCH v3 3/3] usb: dwc: host: add xhci_plat_priv quirk XHCI_SKIP_PHY_INIT Date: Thu, 24 Mar 2022 12:07:11 +0530 Message-ID: <1648103831-12347-4-git-send-email-quic_c_sanm@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1648103831-12347-1-git-send-email-quic_c_sanm@quicinc.com> References: <1648103831-12347-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=-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 Currently the phy init is done from dwc3 and also xhci which makes the runtime_usage value 2 for the phy which causes issue during runtime suspend. When we run the below command the runtime_status still shows active. echo auto > /sys/bus/platform/devices/88e3000.phy/power/control dwc3 manages PHY by own DRD driver, so skip the management by HCD core by setting this quirk. Signed-off-by: Sandeep Maheswaram --- drivers/usb/dwc3/host.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index eda8719..d4fcf06 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -13,6 +13,12 @@ #include #include "core.h" +#include +#include + +static const struct xhci_plat_priv xhci_plat_dwc3_xhci = { + .quirks = XHCI_SKIP_PHY_INIT, +}; static void dwc3_host_fill_xhci_irq_res(struct dwc3 *dwc, int irq, char *name) @@ -122,6 +128,13 @@ int dwc3_host_init(struct dwc3 *dwc) } } + ret = platform_device_add_data(xhci, &xhci_plat_dwc3_xhci, + sizeof(xhci_plat_dwc3_xhci)); + if (ret) { + dev_err(dwc->dev, "failed to add data to xHCI\n"); + goto err; + } + ret = platform_device_add(xhci); if (ret) { dev_err(dwc->dev, "failed to register xHCI device\n"); -- 2.7.4