Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10283644rwl; Sun, 1 Jan 2023 23:00:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXuvmvp6p4iToOyYKteDwC896mLMzgghvZR85x2w3Cr/puTUGjEsULtke1EVsjLgrCqG8DSh X-Received: by 2002:a05:6a20:94c6:b0:ad:aaac:d40b with SMTP id ht6-20020a056a2094c600b000adaaacd40bmr48872390pzb.45.1672642818921; Sun, 01 Jan 2023 23:00:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672642818; cv=none; d=google.com; s=arc-20160816; b=tuCdI1alAJdgfMX+GLIEeP9TeWJgTtZx/r484d9KE9YhqPp1F1RIZ0cpGpRtb9rxNd BprncFGCYUFcqt3E/5WYGdKJNJ+rg6uWEY8CnLjU1nSUddMi13j3mPbyXvOb0oDh5sl5 c7xmdR2clYgnu2/nMxjr5TzufumojF94iQPvmrX8GhOuLDt3C+sV/SsQsKq3fKPA4bPe YRqjU2DQZKZLsURU6Kcl3ILrL9YgkHBhBaeXtyAf8SWBq2yOf90es3m/aafiyoQRHqoG p4qsoo/5bnoKPeCyO5GFIUjc/0/36aMoC4NqTL9bhiBn7kQR/Milg9Rz5ZYfEn6PWvE8 QFOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:user-agent :in-reply-to:mime-version:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=iENR/Lpbp9pO+khBHW4bk8uIePN9ziLkKDUIjKxkGKw=; b=k65pJVj1/+F6TGyp1CKit0zKa280LjblVzax5K/i7eljZp/azeOVi6qiNBNeGfRJRy 8j7KHjydpihbGIK9qPSWtsdDCMuoBXDpExvlyNOIYsRmy46X6+eooIaxDfmXBVwwUTKy 0Ct/6sWW2IlaSrUl/x31OA6E2BSrKuG2heEr6C4RvPp7KFTqQbZy44GiX1HE0RyIOYIN 1clH/XgkvTzdPoefxW9KBGxNVW43ZMFzTlJ0yCnwrKeBD9uLZGzZAyxHlMqhMrfTSKrY pxD9c9GTKqcFqcOoBij5wbxa6DKqQ2QG3+z4HS43hmWjDv+LYRlcvipL+Q+RBg9ig0LT xR7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=tbQCvfZc; 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=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y72-20020a638a4b000000b0047841428c4esi28313226pgd.787.2023.01.01.23.00.09; Sun, 01 Jan 2023 23:00:18 -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=@samsung.com header.s=mail20170921 header.b=tbQCvfZc; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229544AbjABGl4 (ORCPT + 60 others); Mon, 2 Jan 2023 01:41:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjABGly (ORCPT ); Mon, 2 Jan 2023 01:41:54 -0500 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46973F06 for ; Sun, 1 Jan 2023 22:41:51 -0800 (PST) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20230102064148epoutp04bb12612fd1fb2fab1c9cd704221801f4~2asWmNUy70784907849epoutp04y for ; Mon, 2 Jan 2023 06:41:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20230102064148epoutp04bb12612fd1fb2fab1c9cd704221801f4~2asWmNUy70784907849epoutp04y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1672641708; bh=iENR/Lpbp9pO+khBHW4bk8uIePN9ziLkKDUIjKxkGKw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tbQCvfZcy+pqCbfs9zAYAwFZUXx/gRG9b6Wd9gtfch+J7s0Gz0ihVDz6QALEO1DHa lnzg0oWkjYeWk+3vLGtd+xn46C/IXi1hEQBOYOpjSJVPTg/3oNTdlKMmGnyz42B650 JMXJjuqzl3YBqN6Da38Ght0bzcG9LWeBLiu615UM= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20230102064147epcas2p298f17801c6b811872af2956fc055fa45~2asV5aLqN0835708357epcas2p2V; Mon, 2 Jan 2023 06:41:47 +0000 (GMT) Received: from epsmges2p3.samsung.com (unknown [182.195.36.101]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4NlmVg4lKhz4x9Q3; Mon, 2 Jan 2023 06:41:47 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id 12.10.61831.BAC72B36; Mon, 2 Jan 2023 15:41:47 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20230102064147epcas2p4049d9efd78521375e2fd709326df0fb2~2asVMqNrb3080130801epcas2p4Y; Mon, 2 Jan 2023 06:41:47 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230102064147epsmtrp2caac934753ae984767844a10ce2886b7~2asVHGtKm1419014190epsmtrp2h; Mon, 2 Jan 2023 06:41:47 +0000 (GMT) X-AuditID: b6c32a47-887fd7000000f187-29-63b27cabd1a8 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id D3.E1.10542.AAC72B36; Mon, 2 Jan 2023 15:41:46 +0900 (KST) Received: from ubuntu (unknown [10.229.95.128]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230102064146epsmtip1c5b182fdaa248f830f5f37db620a329d~2asU214C52799127991epsmtip1F; Mon, 2 Jan 2023 06:41:46 +0000 (GMT) Date: Mon, 2 Jan 2023 15:35:36 +0900 From: Jung Daehwan To: Arnd Bergmann Cc: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Thinh Nguyen , Mathias Nyman , Felipe Balbi , "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 Message-ID: <20230102063536.GD74470@ubuntu> MIME-Version: 1.0 In-Reply-To: <4c779562-37d2-4bd3-bb02-41b943d7ef9d@app.fastmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrJJsWRmVeSWpSXmKPExsWy7bCmhe7qmk3JBhO+KFv8nXSM3eJY2xN2 i/lHzrFanFq+kMmiefF6Nou7D3+wWPS9eMhscXnXHDaLRctamS2aN01htWjde4TdouvuDUaL SQdFLVYtOMDuwOfx+9ckRo/Fe14yeWxa1cnmcefaHjaP/XPXsHv0bVnF6LFl/2dGj8+b5AI4 orJtMlITU1KLFFLzkvNTMvPSbZW8g+Od403NDAx1DS0tzJUU8hJzU22VXHwCdN0yc4Du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4049d9efd78521375e2fd709326df0fb2 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----3fo7lev8HRxwEdfRbJiPjGY7XcYF58l8nMiK-NSEDm8eBp4M=_e4df7_" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20221229100413epcas2p34c702faf8c96d207cf1659b1173f8858 References: <1672307866-25839-1-git-send-email-dh10.jung@samsung.com> <1672307866-25839-2-git-send-email-dh10.jung@samsung.com> <4c779562-37d2-4bd3-bb02-41b943d7ef9d@app.fastmail.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 ------3fo7lev8HRxwEdfRbJiPjGY7XcYF58l8nMiK-NSEDm8eBp4M=_e4df7_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline On Thu, Dec 29, 2022 at 03:44:02PM +0100, Arnd Bergmann wrote: > 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. > I've tried to use existing platform drivers(dwc3, xhci-plat). Dwc3 has host mode and I think it's necessary to have child node. Currently we can't use compatible string but can just use xhci platform driver itself. That's why I modified to have a xhci child. It makes us to use specific properties. I don't find a better way even if it's not the normal way. I'm going to talk with other maintainers(dwc3, xhci-plat) to solve the problem. > > @@ -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 > Thanks for the comment. I will separate and fix commit msg on next submission. Best Regards, Jung Deahwan ------3fo7lev8HRxwEdfRbJiPjGY7XcYF58l8nMiK-NSEDm8eBp4M=_e4df7_ Content-Type: text/plain; charset="utf-8" ------3fo7lev8HRxwEdfRbJiPjGY7XcYF58l8nMiK-NSEDm8eBp4M=_e4df7_--