Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6051081rwl; Thu, 29 Dec 2022 06:55:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXu+RfaJFWHHxzerp17wsjcijgLp3r3qarlhpO9AbK9ljRH270ZSWfpxaHnKWvdy3ndg9+NR X-Received: by 2002:a05:6402:12d4:b0:47c:303f:979b with SMTP id k20-20020a05640212d400b0047c303f979bmr25415367edx.19.1672325717715; Thu, 29 Dec 2022 06:55:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672325717; cv=none; d=google.com; s=arc-20160816; b=zBvEcVw474wgzcYFEwdkKaaLJte/4T7dk7N4S1PVC6SETH1O8r7Hc1Ud3kvyMd+kGx rU1hqiQAJq2U3CI6dx5xrUa4aOt20U7LTI4KL6UTlnH048f1YEjxnVmtzLKAYxtbq41g a9+UHJVagbG/t57ikszdhgqUJ7dRkYWUdXQFXIIhH2Sw7J2SAwJLJz4IwaljHmqENiEX vbpv+oWwsjASctNgXc7b8TZXXTHl7cDF62qvOXsupJJjl8QJtqyYgrvsNF0TGHvPjI5P 8AArWWfKSlvgObiiUg3yY7nQz84ubbD9DyjVx4hZF1T9aB+6y5pZ+xkr1Qi2HbPu64Gi R0wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=JTZgLSlIIOqenxEyLqfYo+J6+xlLVEFKuOuTUw7iSWE=; b=YWPHiZNpoxMMOrx2ubhImbuqGMACI89e+R4ecMijI3BVDGr01PQ3+PQsaWYzVupeon YxRC/18Ty42kxBiTiILtCfSrCyOpqOIGlPNDeiF9wSuW8TJswd+l5KeGd9r5ZWYPSvU+ okJHHV+5tNRdjSDevytUkCht4fdGp82msafRXVp7ITdcOSbExxhMHBBFg990u1gVEowo 9BVo0wOaYcwG/HWEkzHkp1rL/lL+UGahHUeHuKuEjUOy6kq8bufdrikmGRFq6ywY5cBi ARi8RMNZVSUWjGF9fESnt9hkQ9XFqGBusdSLMIiyHfOohxQowrwwvatlSWDjjhC3rix+ zFqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=DZTPZthc; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=bLSbDrHh; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e1-20020a056402148100b004608c0b9a8asi10286799edv.201.2022.12.29.06.55.03; Thu, 29 Dec 2022 06:55:17 -0800 (PST) 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=@arndb.de header.s=fm1 header.b=DZTPZthc; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=bLSbDrHh; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233536AbiL2Oob (ORCPT + 61 others); Thu, 29 Dec 2022 09:44:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233461AbiL2Oo2 (ORCPT ); Thu, 29 Dec 2022 09:44:28 -0500 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A50C712AEA; Thu, 29 Dec 2022 06:44:27 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 81A23320051E; Thu, 29 Dec 2022 09:44:24 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Thu, 29 Dec 2022 09:44:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1672325064; x=1672411464; bh=JTZgLSlIIO qenxEyLqfYo+J6+xlLVEFKuOuTUw7iSWE=; b=DZTPZthcZYu1YEUlH1zU3pVIG3 RzyI9Zm0zpIAOe8fvCgTm13UsUnNFGXVWZXfN9XFrY9emstyy746EfdppTH+rs1K nESO87lyUky4GtWjyfgb6xdqrRGJNJml423z04OqR1uzFVIeDeyBhKUmjPRrg2Lm X1GCZd3LrJmjG7qmnq9Qcd+pcs/dqMT6VO7QDWV3R5oElO2eZPLQe95HEEFil1Yo PBV2Ymm1IsZh2yE44klgHvNdQcteYWGMOKgqP/WCtXoy9tlO/bz4UFxFny50ZsEg 5GE1mvcf+qA6tezCydHEGd4T8lGlTyTw/uf+6JH9JvZin2zKKNYXp0HoV8BA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1672325064; x=1672411464; bh=JTZgLSlIIOqenxEyLqfYo+J6+xlL VEFKuOuTUw7iSWE=; b=bLSbDrHhS8mDxk5E+B4reyFQ2TvYVxi2YOEZKLDx/AZ5 7a/E+YLSbCqWeK4lJZ8xVdlbhpdry5H/Cmn2ek0DtLS9cZ6N+NmRjHW8P57u5nHz 9JhKqmqL3tJ8IZ3C3luaDV+YvLeup/A+xeiTQj0nKdyrBzz3lh2kUmPMJVt+q+xu bfcYL3CIOI13yE1U30yVcocSYlRWEaxreEJiDC48eVPYqPbn/eCFQg5Igv9GpEX5 KiF08DMezFHcecNODfsIjyy/nm+o2UGYiS0Ncvc5asuTfgZtM7LbBnIsYG16kJRT DPZtEjhxLndbXccqH1yAEmnymf9P+MXl78JciTR2kQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrieeggdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 60BDFB60086; Thu, 29 Dec 2022 09:44:23 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1185-g841157300a-fm-20221208.002-g84115730 Mime-Version: 1.0 Message-Id: <4c779562-37d2-4bd3-bb02-41b943d7ef9d@app.fastmail.com> In-Reply-To: <1672307866-25839-2-git-send-email-dh10.jung@samsung.com> References: <1672307866-25839-1-git-send-email-dh10.jung@samsung.com> <1672307866-25839-2-git-send-email-dh10.jung@samsung.com> Date: Thu, 29 Dec 2022 15:44:02 +0100 From: "Arnd Bergmann" To: "Daehwan Jung" , "Greg Kroah-Hartman" , "Rob Herring" , "Krzysztof Kozlowski" , "Thinh Nguyen" , "Mathias Nyman" , "Felipe Balbi" Cc: "open list:USB SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list" , sc.suh@samsung.com, taehyun.cho@samsung.com, jh0801.jung@samsung.com, eomji.oh@samsung.com Subject: Re: [RFC PATCH v2 1/3] usb: support Samsung Exynos xHCI Controller Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS 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 On Thu, Dec 29, 2022, at 10:57, Daehwan Jung wrote: > Currently, dwc3 invokes just xhci platform driver without any data. > We add xhci node as child of dwc3 node in order to get data from > device tree. It populates "xhci" child by name during initialization > of host. This patch only effects if dwc3 node has a child named "xhci" > not to disturb original path. Using child nodes is not the normal way of abstracting a soc specific variant of a device, though there are some USB host drivers that do this. Just use the node itself and add whatever samsung specific properties are needed based on the compatible string. > @@ -86,6 +90,33 @@ static void xhci_plat_quirks(struct device *dev, > struct xhci_hcd *xhci) > xhci->quirks |= XHCI_PLAT | priv->quirks; > } > > +static int xhci_plat_bus_suspend(struct usb_hcd *hcd) > +{ > + struct xhci_hcd *xhci = hcd_to_xhci(hcd); > + > + if (xhci->quirks & XHCI_ROOTHUB_WAKEUP) { > + if (hcd == xhci->main_hcd) > + __pm_relax(xhci->main_wakelock); > + else > + __pm_relax(xhci->shared_wakelock); > + } > + > + return xhci_bus_suspend(hcd); > +} > + > +static int xhci_plat_bus_resume(struct usb_hcd *hcd) > +{ > + struct xhci_hcd *xhci = hcd_to_xhci(hcd); > + > + if (xhci->quirks & XHCI_ROOTHUB_WAKEUP) { > + if (hcd == xhci->main_hcd) > + __pm_stay_awake(xhci->main_wakelock); > + else > + __pm_stay_awake(xhci->shared_wakelock); > + } > + return xhci_bus_resume(hcd); > +} It looks like these are no longer tied to the Samsung device type, which would be a step in the right direction, but I think adding this should be a separate patch since it is not a hardware specific change but a new feature. Arnd