Skip to content

Commit c3788cd

Browse files
Heikki Krogerusgregkh
authored andcommitted
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: f6fb9ec ("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>
1 parent 4733c0b commit c3788cd

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

drivers/usb/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,4 @@ config USB_ULPI_BUS
205205
To compile this driver as a module, choose M here: the module will
206206
be called ulpi.
207207

208-
config USB_ROLE_SWITCH
209-
tristate
210-
select USB_COMMON
211-
212208
endif # USB_SUPPORT

drivers/usb/common/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ usb-common-$(CONFIG_USB_LED_TRIG) += led.o
99

1010
obj-$(CONFIG_USB_OTG_FSM) += usb-otg-fsm.o
1111
obj-$(CONFIG_USB_ULPI_BUS) += ulpi.o
12-
obj-$(CONFIG_USB_ROLE_SWITCH) += roles.o

drivers/usb/roles/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
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+
114
if USB_ROLE_SWITCH
215

316
config USB_ROLES_INTEL_XHCI

drivers/usb/roles/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
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
File renamed without changes.

0 commit comments

Comments
 (0)