Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp649901pxb; Wed, 16 Feb 2022 01:00:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8N/ABsBzGed5+mjLn08mvO7a9ml0Eh0ocPJovj05HQqHzV0BMK2wWe41YvkG7qb5K35Xt X-Received: by 2002:a17:902:ea08:b0:14b:e74:d7bd with SMTP id s8-20020a170902ea0800b0014b0e74d7bdmr1598950plg.126.1645002014708; Wed, 16 Feb 2022 01:00:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645002014; cv=none; d=google.com; s=arc-20160816; b=lhOeSZhCEuRV9uEd86YV8O6hkiGZlqwd9eTaJjiLjSULRT6ZEhQfdvgzx0uW6NfmZX VA3d+v/sr3n4alZplRBNfR7IXd1m6lZooli1ssFe5l4sKrc0jMexwC+sXP0t7vK4U+h+ DnZMQRuHwuTILGgHlABDoqMqievb22uMpiUYIwdUvWB2U03gTPtFfovAtwa/uq8fjx2Y bT9+oLUMpGi2gDFsUjQwOI5/IFuoEbe/q/2w5TW3bDcID/M27HxnncQZ85QXY3wzIpZQ +XxbaC+z3EB+DI8t9QK+ilwPhyilk7ZCl/5KBFHteHjfSytqf9gG/APhjfB4U+KxjyeD hU0w== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4y71aus8Ob7SpkYYykXhuO5i7j3UaPqtGgLoekb6pW8=; b=mE2Mb7q06CztrgmqKCG+L1VIvMnD+nMkXz42onOPrcZH56q/F1sJnIzS7EizkPeWAq wWzOPmgcfs6v3r4r87NoWbAN1LzdGjnAu+imWPWPC7eOJXbcTfVEplyCxsjmKTknNASD yxbPKW7NsJHxM4YErkN5aqlh60ocs96QREnNdH5oAP+mZhvozqnZDcD3PV661RvYkDc9 1WamlQntp+uP8tDD4dy/f570P/mMgLTsKlr1aw9NrZLcchk3XJnAzCrJXz8BSi6n3PNI Uh693Onur5TJ394+tO87ICNzjQKIzLSMCX9OyrvoZ1uPQbzj8H9H3T+2WOzz7zi5jJGr 7eEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=FnKSofJj; 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 w185si3778792pgd.782.2022.02.16.01.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 01:00:14 -0800 (PST) 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=FnKSofJj; 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 60FA32AC900; Wed, 16 Feb 2022 00:58:59 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231818AbiBPI6z (ORCPT + 99 others); Wed, 16 Feb 2022 03:58:55 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:38732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231666AbiBPI6y (ORCPT ); Wed, 16 Feb 2022 03:58:54 -0500 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 3B0D82ABD1F; Wed, 16 Feb 2022 00:58:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645001922; x=1676537922; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=4y71aus8Ob7SpkYYykXhuO5i7j3UaPqtGgLoekb6pW8=; b=FnKSofJjr8nx6/ik2wBUPfPdtszWqWhUMBl/WIGpvXgXEMIvSqosb5h5 y900Rb91wV6E5GW/sWjmgVIq4kEdeTtzGeRkFalq4pF3rbIgMDfXx8Xzv FEihIu8OBwgKubSlK/U5IdAqo8eMJFV8dpU+kx6EwFH9Zwr1YXpfepCnF 8=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-02.qualcomm.com with ESMTP; 16 Feb 2022 00:58:41 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2022 00:58:41 -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.986.15; Wed, 16 Feb 2022 00:58:41 -0800 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.922.19; Wed, 16 Feb 2022 00:58:35 -0800 Date: Wed, 16 Feb 2022 14:28:31 +0530 From: Pavan Kondeti To: Jun Li CC: Pavan Kondeti , Li Jun , Sandeep Maheswaram , Peter Chen , Pawel Laszczak , Roger Quadros , Aswath Govindraju , "Greg Kroah-Hartman" , Felipe Balbi , Mathias Nyman , Stephen Boyd , Doug Anderson , Matthias Kaehlcke , , Linux USB List , lkml , Subject: Re: [PATCH 2/2] usb: dwc: host: add xhci_plat_priv quirk XHCI_SKIP_PHY_INIT Message-ID: <20220216085831.GA15957@hu-pkondeti-hyd.qualcomm.com> References: <1644949454-814-1-git-send-email-quic_c_sanm@quicinc.com> <1644949454-814-3-git-send-email-quic_c_sanm@quicinc.com> <20220216080028.GA13793@hu-pkondeti-hyd.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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 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 On Wed, Feb 16, 2022 at 04:49:32PM +0800, Jun Li wrote: > Pavan Kondeti 于2022年2月16日周三 16:00写道: > > > > On Wed, Feb 16, 2022 at 03:16:40PM +0800, Jun Li wrote: > > > Sandeep Maheswaram 于2022年2月16日周三 14:58写道: > > > > > > > > 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 | 15 +++++++++++++++ > > > > 1 file changed, 15 insertions(+) > > > > > > > > diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c > > > > index eda8719..4a035a8 100644 > > > > --- a/drivers/usb/dwc3/host.c > > > > +++ b/drivers/usb/dwc3/host.c > > > > @@ -13,6 +13,14 @@ > > > > #include > > > > > > > > #include "core.h" > > > > +#include > > > > +#include > > > > +#include > > > > + > > > > + > > > > +static const struct xhci_plat_priv xhci_plat_dwc3_xhci = { > > > > + .quirks = XHCI_SKIP_PHY_INIT, > > > > +}; > > > > > > It's better to create this xhci_plat_priv by each dwc3 glue layer, > > > with that, we can use this priv to pass other flags and possibly > > > override APIs by each glue driver which may not apply to all dwc3 > > > platforms. > > > > > > > Do you see a need for any glue driver to know about this xHC platform data? > > Yes. I have some xhci quirks which are specifix to NXP iMX platforms. > > > AFAICT, glue driver has no direction connection with the dwc3 core. All > > the required data is coming from dT on ARM based boards. Adding a private > > interface between dwc3 core and glue for passing xhci platform data seems > > to be overkill. If there is a pressing need, why not? > > And looking at xhci_plat_priv members > > -struct xhci_plat_priv { > - const char *firmware_name; > - unsigned long long quirks; > - int (*plat_setup)(struct usb_hcd *); > - void (*plat_start)(struct usb_hcd *); > - int (*init_quirk)(struct usb_hcd *); > - int (*suspend_quirk)(struct usb_hcd *); > - int (*resume_quirk)(struct usb_hcd *); > -}; > > Are we going to share the same all those quirks and APIs > implementation across all dwc3 platforms? > Currently Yes. Thats why I am asking if there is a pressing need to make this more complex than it needs to be.. Thanks, Pavan