From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9059C47090 for ; Thu, 1 Dec 2022 09:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229977AbiLAJCO (ORCPT ); Thu, 1 Dec 2022 04:02:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbiLAJCK (ORCPT ); Thu, 1 Dec 2022 04:02:10 -0500 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8294531DC4; Thu, 1 Dec 2022 01:02:09 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id EBE405C0162; Thu, 1 Dec 2022 04:02:08 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Thu, 01 Dec 2022 04:02:08 -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=1669885328; x=1669971728; bh=Tr903Ha6Gn GkBubWESk087w5xs8HydaDZLktcx+BB4A=; b=dXYCXi+KFlOmGUtP2XGiezXVYe GOkuSUaMiwFCI0nevqHRkHxEezGdjE+fK5q2oKUTPfPW+qyJbQmuSGrWSHi6iGo3 rJU0gv0uMcGvnm6rrT1kdfZmpRQ8qhtfYjBVuzyoxrfTcQ/YfY+QdSQlqeSWECpH UKQ+vRurXL3D+j+wLzQuoxfMDUPVBsNsueNdIcu2XJADPrABcBN7GiOXP3Nctq65 17Z3nX2lnzyn+R2CKkd2YnwDbGxYY1sXHqxZ4qHbbA0uuXKUnyTBYH+nUYkb/pxI 1NUD6zT7lNXxezrjkkIRynHerlpIvyVZlxNeKFzgA+CbNGKr0zlGsrW4RJow== 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= fm1; t=1669885328; x=1669971728; bh=Tr903Ha6GnGkBubWESk087w5xs8H ydaDZLktcx+BB4A=; b=ukTsSL5N5FrwOrv4HQKUWAP0huyiaZ9mQ1NuOEws4Svf rpk+X1F2qfHkbTNPjd/NgvjmWtPnYdCuT70ASZDVyGqijIqCCOGNQPSG4dz5TLNa ZkJVLYYIkArZ+joGaMdEMVGMFAgOnI7j2HD8s9ta/CPk4Tp29rBwsC8JKAYi11jB o9nESw5ycTDycCXWg8+7gMxHJsZy3x5c+BYiuVsxgae5TUWmhNcjmv/l+qJ2R2by I957Mr2QaGt4vF+GeCotP4KoPPbHy4LxjOpy6zqHbsL5LdXzyfkHo3xWoJ8PHCRg nJGDXBdrSeatIkJVU5KAKUHL+bFGAGO2XIRyLhXVXg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtdeggdduvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 1B769B60086; Thu, 1 Dec 2022 04:02:08 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead Mime-Version: 1.0 Message-Id: In-Reply-To: References: <1669860811-171746-1-git-send-email-dh10.jung@samsung.com> <1669860811-171746-3-git-send-email-dh10.jung@samsung.com> Date: Thu, 01 Dec 2022 10:01:44 +0100 From: "Arnd Bergmann" To: "Greg Kroah-Hartman" , "Daehwan Jung" Cc: "Rob Herring" , "Krzysztof Kozlowski" , "Alim Akhtar" , "Mathias Nyman" , "Linus Walleij" , "Colin Ian King" , "Artur Bujdoso" , "Juergen Gross" , "Tomer Maimon" , "open list:USB SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES" , "open list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES" , "open list" , sc.suh@samsung.com, taehyun.cho@samsung.com, jh0801.jung@samsung.com, eomji.oh@samsung.com Subject: Re: [RFC PATCH v1 2/2] usb: host: add xhci-exynos to support Exynos SOCs Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Dec 1, 2022, at 09:06, Greg Kroah-Hartman wrote: > On Thu, Dec 01, 2022 at 11:13:31AM +0900, Daehwan Jung wrote: >> This driver works with xhci platform driver. It needs to override >> functions of xhci_plat_hc_driver. Wakelocks are used for sleep/wakeup >> scenario of system. > > So this means that no other platform xhci driver can be supported in the > same system at the same time. > > Which kind of makes sense as that's not anything a normal system would > have, BUT it feels very odd. This whole idea of "override the platform > driver" feels fragile, why not make these just real platform drivers and > have the xhci platform code be a library that the other ones can use? > That way you have more control overall, right? Agreed, having another layer here (hcd -> xhci -> xhcd_platform -> xhcd_exynos) would fit perfectly well into how other SoC specific drivers are abstracted. This could potentially also help reduce the amount of code duplication between other soc specific variants (mtk, tegra, mvebu, ...) that are all platform drivers but don't share code with xhci-plat.c. Alternatively, it seems that all of the xhci-exynos support could just be part of the generic xhci-platform driver: as far as I can tell, none of the added code is exynos specific at all, instead it is a generic xhci that is using the wakeup_source framework. It should be possible to check at runtime whether an xhci-platform instance uses the wakeup source or not, and then have the same driver work across more platforms. Arnd