Input: rework USB Kconfig dependencies
Subsystems (2)
PATCH 1/1 Input: rework USB Kconfig dependencies
From: Arnd Bergmann <[email protected]>
A lot of input drivers traditionally depend on CONFIG_USB_ARCH_HAS_HCD and select CONFIG_USB. This works but is different from almost every other subsystem in the kernel.
I found this when debugging a build failure in the RC subsystem that had the same logic.
The problem here is that CONFIG_USB_ARCH_HAS_HCD no longer has a meaning since the host controller support has been changed to use machine specific loadable modules for the USB host. Selecting a subsystem that a driver needs is confusing and can lead to recursive dependency chains in Kconfig.
In both cases, the normal logic is to specify 'depends on USB'.
--- drivers/input/joystick/Kconfig | 6 ++---- drivers/input/misc/Kconfig | 15 +++++---------- drivers/input/mouse/Kconfig | 9 +++------ drivers/input/tablet/Kconfig | 15 +++++---------- drivers/input/touchscreen/Kconfig | 3 +-- 5 files changed, 16 insertions(+), 32 deletions(-)
drivers/input/joystick/Kconfig +2 -4
@@ -291,8 +291,7 @@ config JOYSTICK_JOYDUMP config JOYSTICK_XPAD tristate "X-Box gamepad support" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to use the X-Box pad with your computer. Make sure to say Y to "Joystick support" (CONFIG_INPUT_JOYDEV)
@@ -364,8 +363,7 @@ config JOYSTICK_PSXPAD_SPI_FF config JOYSTICK_PXRC tristate "PhoenixRC Flight Controller Adapter" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to use the PhoenixRC Flight Controller Adapter.
drivers/input/misc/Kconfig +5 -10
@@ -367,8 +367,7 @@ config INPUT_ATLAS_BTNS config INPUT_ATI_REMOTE2 tristate "ATI / Philips USB RF remote control" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to use an ATI or Philips USB RF remote control. These are RF remotes with USB receivers.
@@ -382,8 +381,7 @@ config INPUT_ATI_REMOTE2 config INPUT_KEYSPAN_REMOTE tristate "Keyspan DMR USB remote control" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to use a Keyspan DMR USB remote control. Currently only the UIA-11 type of receiver has been tested. The tag
@@ -407,8 +405,7 @@ config INPUT_KXTJ9 config INPUT_POWERMATE tristate "Griffin PowerMate and Contour Jog support" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to use Griffin PowerMate or Contour Jog devices. These are aluminum dials which can measure clockwise and anticlockwise
@@ -423,8 +420,7 @@ config INPUT_POWERMATE config INPUT_YEALINK tristate "Yealink usb-p1k voip phone" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to enable keyboard and LCD functions of the Yealink usb-p1k usb phones. The audio part is enabled by the generic
@@ -438,8 +434,7 @@ config INPUT_YEALINK config INPUT_CM109 tristate "C-Media CM109 USB I/O Controller" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to enable keyboard and buzzer functions of the C-Media CM109 usb phones. The audio part is enabled by the generic
drivers/input/mouse/Kconfig +3 -6
@@ -215,8 +215,7 @@ config MOUSE_SERIAL config MOUSE_APPLETOUCH tristate "Apple USB Touchpad support" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to use an Apple USB Touchpad.
@@ -236,8 +235,7 @@ config MOUSE_APPLETOUCH config MOUSE_BCM5974 tristate "Apple USB BCM5974 Multitouch trackpad support" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you have an Apple USB BCM5974 Multitouch trackpad.
@@ -430,8 +428,7 @@ config MOUSE_SYNAPTICS_I2C config MOUSE_SYNAPTICS_USB tristate "Synaptics USB device support" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to use a Synaptics USB touchpad or pointing stick.
drivers/input/tablet/Kconfig +5 -10
@@ -14,8 +14,7 @@ if INPUT_TABLET config TABLET_USB_ACECAD tristate "Acecad Flair tablet support (USB)" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to use the USB version of the Acecad Flair tablet. Make sure to say Y to "Mouse support"
@@ -27,8 +26,7 @@ config TABLET_USB_ACECAD config TABLET_USB_AIPTEK tristate "Aiptek 6000U/8000U and Genius G_PEN tablet support (USB)" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to use the USB version of the Aiptek 6000U, Aiptek 8000U or Genius G-PEN 560 tablet. Make sure to say Y to
@@ -40,8 +38,7 @@ config TABLET_USB_AIPTEK config TABLET_USB_HANWANG tristate "Hanwang Art Master III tablet support (USB)" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to use the USB version of the Hanwang Art Master III tablet.
@@ -51,8 +48,7 @@ config TABLET_USB_HANWANG config TABLET_USB_KBTAB tristate "KB Gear JamStudio tablet support (USB)" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to use the USB version of the KB Gear JamStudio tablet. Make sure to say Y to "Mouse support"
@@ -64,8 +60,7 @@ config TABLET_USB_KBTAB config TABLET_USB_PEGASUS tristate "Pegasus Mobile Notetaker Pen input tablet support" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help Say Y here if you want to use the Pegasus Mobile Notetaker, also known as:
drivers/input/touchscreen/Kconfig +1 -2
@@ -917,8 +917,7 @@ config TOUCHSCREEN_WM97XX_ZYLONITE config TOUCHSCREEN_USB_COMPOSITE tristate "USB Touchscreen Driver" - depends on USB_ARCH_HAS_HCD - select USB + depends on USB help USB Touchscreen driver for: - eGalax Touchkit USB (also includes eTurboTouch CT-410/510/700)
Signature · 1 line
2.29.2
Quoted 15 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
A lot of input drivers traditionally depend on
CONFIG_USB_ARCH_HAS_HCDand selectCONFIG_USB. This works but is different from almost every other subsystem in the kernel.I found this when debugging a build failure in the RC subsystem that had the same logic.
The problem here is that
CONFIG_USB_ARCH_HAS_HCDno longer has a meaning since the host controller support has been changed to use machine specific loadable modules for the USB host. Selecting a subsystem that a driver needs is confusing and can lead to recursive dependency chains inKconfig.
Quoted 3 lines
In both cases, the normal logic is to specify 'depends on USB'.
Signed-off-by Arnd Bergmann <[email protected]>
Thanks.
Quoted 8 lines
--- drivers/input/joystick/Kconfig | 6 ++---- drivers/input/misc/Kconfig | 15 +++++---------- drivers/input/mouse/Kconfig | 9 +++------ drivers/input/tablet/Kconfig | 15 +++++---------- drivers/input/touchscreen/Kconfig | 3 +-- 5 files changed, 16 insertions(+), 32 deletions(-)
Signature · 1 line
~Randy