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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31290CFD2F6 for ; Tue, 2 Dec 2025 09:27:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mnWobUqG5nkwU91RtILFZ6byjEOP35YGuzMGM6xrCqI=; b=AxsfvlnGtNLuAwbMfRT+1oVypa TYUU1WnTMdtyQ5U3U7UaB+fElOuXLStl0vBbIWYxxFrzy9lcVe7Z1XBs4RIlTM2Su/CT2OmnzKWT5 B4vFQSndqiMNHcaUp4MOYaamj82XePTPeEjlHDmQovNJ16i80GB0eUAmq1jGt2Zrjca5ovSLRPzlP fg6nO6APP5BTD0GE1AlB2zVJzwS4Y4vko1sGpAJAuKSj/lh7FyBV1haVsJRwxniJWt8Geu0qoXKW9 wD0two1iRHd0cyTyIyaYgJcAp7AjFVuVIW5DdYbtQ6DR3pI7F7ZNOA/xhR3wnJnAFy3Hqnkuwyh8Y J4bPm/+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vQMff-000000056a6-3kPL; Tue, 02 Dec 2025 09:27:43 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vQMfe-000000056Zs-3VrV for linux-arm-kernel@lists.infradead.org; Tue, 02 Dec 2025 09:27:42 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id E8E0F6017A; Tue, 2 Dec 2025 09:27:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D8ADC116D0; Tue, 2 Dec 2025 09:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1764667661; bh=BALjdQsLcT14uiuNhmlNyxPxxPDYE/UJ0M1HcNCiBZE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZW0i6t4YkdwaPTFOUPcOLpx713GubMhd+yoZyRnQkuRX82QMOCrxHlYE3m67DeoRD kVEaOmMu2zml4N6j29oeXnopijGZMxKZmEAl11c/nHt/0Xtk6kEjLngdONdaWDv8z2 jusJMDgTusxSXykS1DTy71q/lw6AOSzQAxP4Sphw= Date: Tue, 2 Dec 2025 10:27:38 +0100 From: Greg Kroah-Hartman To: Roy Luo Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peter Griffin , =?iso-8859-1?Q?Andr=E9?= Draszik , Tudor Ambarus , Thinh Nguyen , Philipp Zabel , Badhri Jagan Sridharan , Doug Anderson , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Joy Chakraborty , Naveen Kumar Subject: Re: [PATCH v8 2/2] usb: dwc3: Add Google Tensor SoC DWC3 glue driver Message-ID: <2025120209-unstylish-john-2a6c@gregkh> References: <20251122-controller-v8-0-e7562e0df658@google.com> <20251122-controller-v8-2-e7562e0df658@google.com> <2025112226-heave-refrain-53e6@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Dec 02, 2025 at 03:01:13AM -0600, Roy Luo wrote: > On Sat, Nov 22, 2025 at 8:59 PM Greg Kroah-Hartman > wrote: > > > > On Sat, Nov 22, 2025 at 09:32:06AM +0000, Roy Luo wrote: > > > Add support for the DWC3 USB controller found on Google Tensor G5 > > > (codename: laguna). The controller features dual-role functionality > > > and hibernation. > > > > > > The primary focus is implementing hibernation support in host mode, > > > enabling the controller to enter a low-power state (D3). This is > > > particularly relevant during system power state transition and > > > runtime power management for power efficiency. > > > Highlights: > > > - Align suspend callback with dwc3_suspend_common() for deciding > > > between a full teardown and hibernation in host mode. > > > - Integration with `psw` (power switchable) and `top` power domains, > > > managing their states and device links to support hibernation. > > > - A notifier callback dwc3_google_usb_psw_pd_notifier() for > > > `psw` power domain events to manage controller state > > > transitions to/from D3. > > > - Coordination of the `non_sticky` reset during power state > > > transitions, asserting it on D3 entry and deasserting on D0 entry > > > in hibernation scenario. > > > - Handling of high-speed and super-speed PME interrupts > > > that are generated by remote wakeup during hibernation. > > > > > > Co-developed-by: Joy Chakraborty > > > Signed-off-by: Joy Chakraborty > > > Co-developed-by: Naveen Kumar > > > Signed-off-by: Naveen Kumar > > > Signed-off-by: Roy Luo > > > --- > > > drivers/usb/dwc3/Kconfig | 13 + > > > drivers/usb/dwc3/Makefile | 1 + > > > drivers/usb/dwc3/dwc3-google.c | 628 +++++++++++++++++++++++++++++++++++++++++ > > > 3 files changed, 642 insertions(+) > > > > > > diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig > > > index 4925d15084f816d3ff92059b476ebcc799b56b51..f58c70dabf108878cbefe0abea88572d9ae81e26 100644 > > > --- a/drivers/usb/dwc3/Kconfig > > > +++ b/drivers/usb/dwc3/Kconfig > > > @@ -200,4 +200,17 @@ config USB_DWC3_GENERIC_PLAT > > > the dwc3 child node in the device tree. > > > Say 'Y' or 'M' here if your platform integrates DWC3 in a similar way. > > > > > > +config USB_DWC3_GOOGLE > > > + tristate "Google Platform" > > > + depends on COMPILE_TEST > > > + depends on OF && COMMON_CLK && RESET_CONTROLLER > > > > Shouldn't this be: > > depends on (OF && COMMON_CLK && RESET_CONTROLLER) || COMPILE_TEST > > > > I shouldn't have to enable those options to just get a build test here, > > the apis should be properly stubbed out if those options are not > > enabled, right? > > > > thanks, > > > > greg k-h > > Hi Greg, > > I agree with your interpretation of COMPILE_TEST but it doesn't > seem to align with upstream convention. I found the following pattern > in several device driver Kconfig files (including but not limited to usb, > pinctrl and phy). > > depends on COMPILE_TEST || ARCH_XXX > depends on CONFIG_A && CONFIG_B... > > For this patch, the APIs exposed by OF, COMMON_CLK > and RESET_CONTROLLER are properly stubbed out so > I'm all good to go with your suggestion, but I'd like to make > sure this approach is conventional. Whatever works for building properly, as-is, what you have in this patch didn't work for my systems at all. > I plan to add ARCH_GOOGLE as a dependency in the next > version per [1], so the "depends on" would probably look like > the following per your suggestion: But "Google" is not an arch :( And really, the whole "only have a sub-arch symbol" is something that personally, I think is totally wrong and prevents kernel images from being built for more than one "arch". As an example, the Android GKI kernel has to support more than one of these, so what does putting this behind a symbol that no one will actually use mean anything? Android will never be only building a ARCH_GOOGLE kernel. > depends on (OF && COMMON_CLK && RESET_CONTROLLER && ARCH_GOOGLE) > || COMPILE_TEST > > Please let me know your thoughts. > [1] https://lore.kernel.org/linux-phy/1a53d473-fc13-4ac5-ba52-4701d95e3073@kernel.org/ Again, I hate the ARCH_ stuff, but Krzysztof does seem to like it for some reason, so I'll defer to others here. But note, as someone who helps maintain a "generic" ARM64 kernel, these ARCH_* usages for different platforms do nothing at all to help anyone out. thanks, greg k-h