Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: common: rework CONFIG_USB_COMMON logic

The phy-am335x driver selects 'USB_COMMON', but all other drivers
use 'depends on' for that symbol, and it depends on USB || USB_GADGET
itself, which causes a Kconfig warning:

warning: (AM335X_PHY_USB) selects USB_COMMON which has unmet direct dependencies (USB_SUPPORT && (USB || USB_GADGET))

As suggested by Felipe Balbi, this turns the logic around, and makes
'USB_COMMON' selected by everything else that needs it, so we can
remove the dependencies.

Fixes: 59f042f644c5 ("usb: phy: phy-am335x: bypass first VBUS sensing for host-only mode")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Felipe Balbi <balbi@kernel.org>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>

authored by

Arnd Bergmann and committed by
Felipe Balbi
badf6d47 dea520a4

+4 -3
+2 -1
drivers/phy/Kconfig
··· 250 250 tristate "Allwinner sun9i SoC USB PHY driver" 251 251 depends on ARCH_SUNXI && HAS_IOMEM && OF 252 252 depends on RESET_CONTROLLER 253 - depends on USB_COMMON 253 + depends on USB_SUPPORT 254 + select USB_COMMON 254 255 select GENERIC_PHY 255 256 help 256 257 Enable this to support the transceiver that is part of Allwinner
+1 -2
drivers/usb/Kconfig
··· 31 31 32 32 config USB_COMMON 33 33 tristate 34 - default y 35 - depends on USB || USB_GADGET 36 34 37 35 config USB_ARCH_HAS_HCD 38 36 def_bool y ··· 39 41 config USB 40 42 tristate "Support for Host-side USB" 41 43 depends on USB_ARCH_HAS_HCD 44 + select USB_COMMON 42 45 select NLS # for UTF-8 strings 43 46 ---help--- 44 47 Universal Serial Bus (USB) is a specification for a serial bus
+1
drivers/usb/gadget/Kconfig
··· 15 15 16 16 menuconfig USB_GADGET 17 17 tristate "USB Gadget Support" 18 + select USB_COMMON 18 19 select NLS 19 20 help 20 21 USB is a master/slave protocol, organized with one master