From patchwork Mon Oct 11 10:01:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandeep Maheswaram X-Patchwork-Id: 12549581 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E78AC433EF for ; Mon, 11 Oct 2021 10:02:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 21FA160F21 for ; Mon, 11 Oct 2021 10:02:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235729AbhJKKEa (ORCPT ); Mon, 11 Oct 2021 06:04:30 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:43674 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235602AbhJKKE3 (ORCPT ); Mon, 11 Oct 2021 06:04:29 -0400 Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 11 Oct 2021 03:02:29 -0700 X-QCInternal: smtphost Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 11 Oct 2021 03:02:27 -0700 X-QCInternal: smtphost Received: from c-sanm-linux.qualcomm.com ([10.206.25.31]) by ironmsg02-blr.qualcomm.com with ESMTP; 11 Oct 2021 15:32:09 +0530 Received: by c-sanm-linux.qualcomm.com (Postfix, from userid 2343233) id E952235A6; Mon, 11 Oct 2021 15:32:07 +0530 (IST) From: Sandeep Maheswaram To: Andy Gross , Bjorn Andersson , Greg Kroah-Hartman , Felipe Balbi , Stephen Boyd , Doug Anderson , Matthias Kaehlcke , Mathias Nyman Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, ppratap@codeaurora.org, pkondeti@codeaurora.org, Sandeep Maheswaram Subject: [PATCH] usb: dwc: host: add xhci_plat_priv quirk XHCI_SKIP_PHY_INIT Date: Mon, 11 Oct 2021 15:31:57 +0530 Message-Id: <1633946518-13906-1-git-send-email-sanm@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org dwc3 manages PHY by own DRD driver, so skip the management by HCD core. During runtime suspend phy was not getting suspend because runtime_usage value is 2. Signed-off-by: Sandeep Maheswaram --- drivers/usb/dwc3/host.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index f29a264..0921f05 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -11,6 +11,11 @@ #include #include "core.h" +#include "../host/xhci-plat.h" + +static const struct xhci_plat_priv xhci_plat_dwc3_xhci = { + .quirks = XHCI_SKIP_PHY_INIT, +}; static int dwc3_host_get_irq(struct dwc3 *dwc) { @@ -115,6 +120,13 @@ int dwc3_host_init(struct dwc3 *dwc) } } + ret = platform_device_add_data(xhci, &xhci_plat_dwc3_xhci, + sizeof(struct xhci_plat_priv)); + 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");