Skip to content

Commit

Permalink
usb: Specify dependencies on USB_XHCI_PLATFORM with 'depends on'
Browse files Browse the repository at this point in the history
Some USB controller drivers that depend on the xhci-plat driver
specify this dependency using 'select' in Kconfig. This is not
recommended for symbols that have other dependencies as it may
lead to invalid configurations. Use 'depends on' to specify the
dependency instead of 'select'.

For DWC3 move the dependency from USB_DWC3 to USB_DWC3_HOST and
USB_DWC3_DUAL_ROLE, to make the DWC3 core selectable for
gadget-only mode when USB_XHCI_PLATFORM=n.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
  • Loading branch information
Matthias Kaehlcke authored and intel-lab-lkp committed Jul 20, 2021
1 parent 26787cc commit 1ac4cac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/usb/cdns3/Kconfig
@@ -1,7 +1,7 @@
config USB_CDNS_SUPPORT
tristate "Cadence USB Support"
depends on USB_SUPPORT && (USB || USB_GADGET) && HAS_DMA
select USB_XHCI_PLATFORM if USB_XHCI_HCD
depends on !USB_XHCI_HCD || USB_XHCI_PLATFORM
select USB_ROLE_SWITCH
help
Say Y here if your system has a Cadence USBSS or USBSSP
Expand Down
3 changes: 2 additions & 1 deletion drivers/usb/dwc3/Kconfig
Expand Up @@ -3,7 +3,6 @@
config USB_DWC3
tristate "DesignWare USB3 DRD Core Support"
depends on (USB || USB_GADGET) && HAS_DMA
select USB_XHCI_PLATFORM if USB_XHCI_HCD
select USB_ROLE_SWITCH if USB_DWC3_DUAL_ROLE
help
Say Y or M here if your system has a Dual Role SuperSpeed
Expand All @@ -30,6 +29,7 @@ choice
config USB_DWC3_HOST
bool "Host only mode"
depends on USB=y || USB=USB_DWC3
depends on USB_XHCI_PLATFORM
help
Select this when you want to use DWC3 in host mode only,
thereby the gadget feature will be regressed.
Expand All @@ -44,6 +44,7 @@ config USB_DWC3_GADGET
config USB_DWC3_DUAL_ROLE
bool "Dual Role mode"
depends on ((USB=y || USB=USB_DWC3) && (USB_GADGET=y || USB_GADGET=USB_DWC3))
depends on USB_XHCI_PLATFORM
depends on (EXTCON=y || EXTCON=USB_DWC3)
help
This is the default mode of working of DWC3 controller where
Expand Down
4 changes: 2 additions & 2 deletions drivers/usb/host/Kconfig
Expand Up @@ -80,7 +80,7 @@ config USB_XHCI_MTK

config USB_XHCI_MVEBU
tristate "xHCI support for Marvell Armada 375/38x/37xx"
select USB_XHCI_PLATFORM
depends on USB_XHCI_PLATFORM
depends on HAS_IOMEM
depends on ARCH_MVEBU || COMPILE_TEST
help
Expand Down Expand Up @@ -112,9 +112,9 @@ config USB_EHCI_BRCMSTB
config USB_BRCMSTB
tristate "Broadcom STB USB support"
depends on (ARCH_BRCMSTB && PHY_BRCM_USB) || COMPILE_TEST
depends on !USB_XHCI_HCD || USB_XHCI_PLATFORM
select USB_OHCI_HCD_PLATFORM if USB_OHCI_HCD
select USB_EHCI_BRCMSTB if USB_EHCI_HCD
select USB_XHCI_PLATFORM if USB_XHCI_HCD
help
Enables support for XHCI, EHCI and OHCI host controllers
found in Broadcom STB SoC's.
Expand Down

0 comments on commit 1ac4cac

Please sign in to comment.