Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp220490rwb; Thu, 1 Dec 2022 01:06:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf5u8AxQP25vpOVSPkpJX0JTuHYIf3kPS/FmXOm/4/6uiLLvXgscinzbNy39SVvv8CzpoQXQ X-Received: by 2002:a50:ed14:0:b0:46b:fb4:6b6f with SMTP id j20-20020a50ed14000000b0046b0fb46b6fmr18430851eds.237.1669885613748; Thu, 01 Dec 2022 01:06:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669885613; cv=none; d=google.com; s=arc-20160816; b=nmkUUNFYdUlRO0JpOyRCoqy1WUKkQ/IBs4TM8A5An6jA2iHDjGmfpik6fzVBgEdIJ9 Rb2CpoyVAQxoEU/FldTv6H+g5yjVl0ERiC66EKTFr6rZGQI+TV+5d0N9Z6+gYt7lLN0+ f4csStlULFFnpRUeEiFfDvgXD/xCoWiEwJ9VrhUPXrqgV4Lddbc3CMIwJ6rSYYljG6gI AlmZiTeiXk/zMBklBsl6OtdJLt8QFa+Vj5IQuE6Kh6lgyOyj2kyqFq7LoqLec8rcJoQd DQ2mpkbpVX1rwGpRHtaqS4KIicWMpWTSN4Rrh+IRgg6mYgUV5+DkGMydwZTpQ0jTI7IQ /aJw== 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=Tr903Ha6GnGkBubWESk087w5xs8HydaDZLktcx+BB4A=; b=hYZEDG69g2zsQ9uycYYf/V5X2Tw6zwdP4dLnKZe0rb3FqAU+7JmRrP7Toe3eE5nmlz oKynyd0E9RvNfBf7DZl/ZxrlUIzo64v/p1F3JEnV4x+h1pMccOVTu7ecNgkjzkOOsYMR QWTjKlDSiYBJQbs8VTzRbap9fRgVNbadVwL635RLYp5jZ/rhsEYiqiCM+qBOmNyHslaX Jjwg6Wg0DMcmkWUE0KX1j0sfbuSTShcltcAaFCi1gvm6/RTrmwHvhG+x+8MXIEEqrWXO 64kYWyZIsV8Hz3ayFI8ZYFazoq0LACl0mQhsM+3aUI9HJ3YfdrweeGjLds02FZalWJ3Q LrMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=dXYCXi+K; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=ukTsSL5N; 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 gn5-20020a1709070d0500b0078d93245e34si3665322ejc.793.2022.12.01.01.06.33; Thu, 01 Dec 2022 01:06:53 -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=dXYCXi+K; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=ukTsSL5N; 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 S229730AbiLAJC1 (ORCPT + 82 others); Thu, 1 Dec 2022 04:02:27 -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 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 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