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

Configure Feed

Select the types of activity you want to include in your feed.

usb: roles: Add a description for the class to Kconfig

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>

authored by

Heikki Krogerus and committed by
Greg Kroah-Hartman
c3788cd9 4733c0b4

+16 -6
-4
drivers/usb/Kconfig
··· 205 205 To compile this driver as a module, choose M here: the module will 206 206 be called ulpi. 207 207 208 - config USB_ROLE_SWITCH 209 - tristate 210 - select USB_COMMON 211 - 212 208 endif # USB_SUPPORT
-1
drivers/usb/common/Makefile
··· 9 9 10 10 obj-$(CONFIG_USB_OTG_FSM) += usb-otg-fsm.o 11 11 obj-$(CONFIG_USB_ULPI_BUS) += ulpi.o 12 - obj-$(CONFIG_USB_ROLE_SWITCH) += roles.o
drivers/usb/common/roles.c drivers/usb/roles/class.c
+13
drivers/usb/roles/Kconfig
··· 1 + config USB_ROLE_SWITCH 2 + tristate "USB Role Switch Support" 3 + help 4 + USB Role Switch is a device that can select the USB role - host or 5 + device - for a USB port (connector). In most cases dual-role capable 6 + USB controller will also represent the switch, but on some platforms 7 + multiplexer/demultiplexer switch is used to route the data lines on 8 + the USB connector between separate USB host and device controllers. 9 + 10 + Say Y here if your USB connectors support both device and host roles. 11 + To compile the driver as module, choose M here: the module will be 12 + called roles.ko. 13 + 1 14 if USB_ROLE_SWITCH 2 15 3 16 config USB_ROLES_INTEL_XHCI
+3 -1
drivers/usb/roles/Makefile
··· 1 - obj-$(CONFIG_USB_ROLES_INTEL_XHCI) += intel-xhci-usb-role-switch.o 1 + obj-$(CONFIG_USB_ROLE_SWITCH) += roles.o 2 + roles-y := class.o 3 + obj-$(CONFIG_USB_ROLES_INTEL_XHCI) += intel-xhci-usb-role-switch.o