1 From 6e002d41889bc52213a26ff91338d340505e0336 Mon Sep 17 00:00:00 2001
2 From: Linus Walleij <linus.walleij@linaro.org>
3 Date: Fri, 11 Nov 2022 15:48:21 +0100
4 Subject: [PATCH 06/29] usb: fotg210: Fix Kconfig for USB host modules
6 The kernel robot reports a link failure when activating the
7 FOTG210 host subdriver with =y on a system where the USB host
8 core is a module (CONFIG_USB=m).
10 This is a bit of special case, so mimic the Kconfig incantations
11 from DWC3: let the subdrivers for host or peripheral depend
12 on the host or gadget support being =y or the same as the
15 This should ensure that either:
17 - The host (CONFIG_USB) or gadget (CONFIG_GADGET) is compiled
18 in and then the FOTG210 can be either module or compiled
21 - The host or gadget is modular, and then the FOTG210 module
22 must be a module too, or we cannot resolve the symbols
25 Reported-by: kernel test robot <lkp@intel.com>
26 Link: https://lore.kernel.org/linux-usb/202211112132.0BUPGKCd-lkp@intel.com/
27 Cc: Arnd Bergmann <arnd@arndb.de>
28 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
29 Link: https://lore.kernel.org/r/20221111144821.113665-1-linus.walleij@linaro.org
30 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32 --- a/drivers/usb/fotg210/Kconfig
33 +++ b/drivers/usb/fotg210/Kconfig
34 @@ -14,7 +14,7 @@ if USB_FOTG210
36 config USB_FOTG210_HCD
37 bool "Faraday FOTG210 USB Host Controller support"
39 + depends on USB=y || USB=USB_FOTG210
41 Faraday FOTG210 is an OTG controller which can be configured as
42 an USB2.0 host. It is designed to meet USB2.0 EHCI specification
43 @@ -24,7 +24,7 @@ config USB_FOTG210_HCD
44 module will be called fotg210-hcd.
46 config USB_FOTG210_UDC
47 - depends on USB_GADGET
48 + depends on USB_GADGET=y || USB_GADGET=USB_FOTG210
49 bool "Faraday FOTG210 USB Peripheral Controller support"
51 Faraday USB2.0 OTG controller which can be configured as