]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: roles: Add a description for the class to Kconfig
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Wed, 12 Dec 2018 17:13:55 +0000 (20:13 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 13:07:59 +0000 (14:07 +0100)
That makes the USB role switch support option visible and
selectable for the user. The class driver is also moved to
drivers/usb/roles/ directory.

This will fix an issue that we have with the Intel USB role
switch driver on systems that don't have USB Type-C connectors:

Intel USB role switch driver depends on the USB role switch
class as it should, but since there was no way for the user
to enable the USB role switch class, there was also no way
to select that driver. USB Type-C drivers select the USB
role switch class which makes the Intel USB role switch
driver available and therefore hides the problem.

So in practice Intel USB role switch driver was depending on
USB Type-C drivers.

Fixes: f6fb9ec02be1 ("usb: roles: Add Intel xHCI USB role switch driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/Kconfig
drivers/usb/common/Makefile
drivers/usb/roles/Kconfig
drivers/usb/roles/Makefile
drivers/usb/roles/class.c [moved from drivers/usb/common/roles.c with 100% similarity]

index 987fc5ba63211bb5829a8f38629e86ab6022a094..70e6c956c23cefe12e37ee0bbb8fa7617088dd8c 100644 (file)
@@ -205,8 +205,4 @@ config USB_ULPI_BUS
          To compile this driver as a module, choose M here: the module will
          be called ulpi.
 
-config USB_ROLE_SWITCH
-       tristate
-       select USB_COMMON
-
 endif # USB_SUPPORT
index fb4d5ef4165c7d2e188395be35cf313935046c1d..0a7c45e8548135f27a4a47157d5a674fb4d29dfe 100644 (file)
@@ -9,4 +9,3 @@ usb-common-$(CONFIG_USB_LED_TRIG) += led.o
 
 obj-$(CONFIG_USB_OTG_FSM) += usb-otg-fsm.o
 obj-$(CONFIG_USB_ULPI_BUS)     += ulpi.o
-obj-$(CONFIG_USB_ROLE_SWITCH)  += roles.o
index f5a5e6f79f1b977d56d1363c30595d32f32c6dd5..e4194ac94510771cafedfa9ec6e6edb24539d538 100644 (file)
@@ -1,3 +1,16 @@
+config USB_ROLE_SWITCH
+       tristate "USB Role Switch Support"
+       help
+         USB Role Switch is a device that can select the USB role - host or
+         device - for a USB port (connector). In most cases dual-role capable
+         USB controller will also represent the switch, but on some platforms
+         multiplexer/demultiplexer switch is used to route the data lines on
+         the USB connector between separate USB host and device controllers.
+
+         Say Y here if your USB connectors support both device and host roles.
+         To compile the driver as module, choose M here: the module will be
+         called roles.ko.
+
 if USB_ROLE_SWITCH
 
 config USB_ROLES_INTEL_XHCI
index e44b179ba2751261dfe562d22e58aa39e513f694..c02873206fc1855c6f162782193e2d26be9e88a5 100644 (file)
@@ -1 +1,3 @@
-obj-$(CONFIG_USB_ROLES_INTEL_XHCI) += intel-xhci-usb-role-switch.o
+obj-$(CONFIG_USB_ROLE_SWITCH)          += roles.o
+roles-y                                        := class.o
+obj-$(CONFIG_USB_ROLES_INTEL_XHCI)     += intel-xhci-usb-role-switch.o