From: Matthias Kaehlcke <mka@chromium.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alan Stern <stern@rowland.harvard.edu>,
Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Mathias Nyman <mathias.nyman@intel.com>,
Felipe Balbi <balbi@kernel.org>
Cc: Michal Simek <michal.simek@xilinx.com>,
linux-usb@vger.kernel.org, Peter Chen <peter.chen@kernel.org>,
Bastien Nocera <hadess@hadess.net>,
Douglas Anderson <dianders@chromium.org>,
Stephen Boyd <swboyd@chromium.org>,
devicetree@vger.kernel.org, Krzysztof Kozlowski <krzk@kernel.org>,
linux-kernel@vger.kernel.org,
Ravi Chandra Sadineni <ravisadineni@chromium.org>,
Matthias Kaehlcke <mka@chromium.org>,
Aswath Govindraju <a-govindraju@ti.com>,
Dmitry Osipenko <digetx@gmail.com>,
Fabio Estevam <festevam@gmail.com>,
Pawel Laszczak <pawell@cadence.com>,
Roger Quadros <rogerq@kernel.org>
Subject: [PATCH v14 4/6] usb: Specify dependencies on USB_XHCI_PLATFORM with 'depends on'
Date: Mon, 19 Jul 2021 15:21:26 -0700 [thread overview]
Message-ID: <20210719152055.v14.4.If248f05613bbb06a44eb0b0909be5d97218f417b@changeid> (raw)
In-Reply-To: <20210719222128.4122837-1-mka@chromium.org>
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>
---
With this patch no Kconfig conflicts were observed with
allmodconfig and in ~100 randconfig cycles.
Changes in v14:
- none
Changes in v13:
- patch added to the series
drivers/usb/cdns3/Kconfig | 2 +-
drivers/usb/dwc3/Kconfig | 3 ++-
drivers/usb/host/Kconfig | 4 ++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/cdns3/Kconfig b/drivers/usb/cdns3/Kconfig
index b98ca0a1352a..07e12f786d48 100644
--- a/drivers/usb/cdns3/Kconfig
+++ b/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
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig
index 66b1454c4db2..29a874644518 100644
--- a/drivers/usb/dwc3/Kconfig
+++ b/drivers/usb/dwc3/Kconfig
@@ -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
@@ -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.
@@ -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
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index df9428f1dc5e..518c2312ef0c 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -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
@@ -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.
--
2.32.0.402.g57bb445576-goog
next prev parent reply other threads:[~2021-07-19 23:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-19 22:21 [PATCH v14 0/6] usb: misc: Add onboard_usb_hub driver Matthias Kaehlcke
2021-07-19 22:21 ` [PATCH v14 1/6] " Matthias Kaehlcke
2021-07-19 22:21 ` [PATCH v14 2/6] of/platform: Add stubs for of_platform_device_create/destroy() Matthias Kaehlcke
2021-07-19 22:21 ` [PATCH v14 3/6] arm64: defconfig: Explicitly enable USB_XHCI_PLATFORM Matthias Kaehlcke
2021-07-19 22:21 ` Matthias Kaehlcke [this message]
2021-07-21 0:46 ` [PATCH v14 4/6] usb: Specify dependencies on USB_XHCI_PLATFORM with 'depends on' kernel test robot
2021-07-23 0:17 ` Matthias Kaehlcke
2021-07-19 22:21 ` [PATCH v14 5/6] usb: host: xhci-plat: Create platform device for onboard hubs in probe() Matthias Kaehlcke
2021-07-19 22:21 ` [PATCH v14 6/6] arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub Matthias Kaehlcke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210719152055.v14.4.If248f05613bbb06a44eb0b0909be5d97218f417b@changeid \
--to=mka@chromium.org \
--cc=a-govindraju@ti.com \
--cc=balbi@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=digetx@gmail.com \
--cc=festevam@gmail.com \
--cc=frowand.list@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hadess@hadess.net \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=michal.simek@xilinx.com \
--cc=pawell@cadence.com \
--cc=peter.chen@kernel.org \
--cc=ravisadineni@chromium.org \
--cc=robh+dt@kernel.org \
--cc=rogerq@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=swboyd@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).