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

HID: intel-thc: fix CONFIG_HID dependency

In drivers/hid/, most drivers depend on CONFIG_HID, while a couple of the
drivers in subdirectories instead depend on CONFIG_HID_SUPPORT and use
'select HID'. With the newly added INTEL_THC_HID, this causes a build
warning for a circular dependency:

WARNING: unmet direct dependencies detected for HID
Depends on [m]: HID_SUPPORT [=y] && INPUT [=m]
Selected by [y]:
- INTEL_THC_HID [=y] && HID_SUPPORT [=y] && X86_64 [=y] && PCI [=y] && ACPI [=y]

WARNING: unmet direct dependencies detected for INPUT_FF_MEMLESS
Depends on [m]: INPUT [=m]
Selected by [y]:
- HID_MICROSOFT [=y] && HID_SUPPORT [=y] && HID [=y]
- GREENASIA_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_GREENASIA [=y]
- HID_WIIMOTE [=y] && HID_SUPPORT [=y] && HID [=y] && LEDS_CLASS [=y]
- ZEROPLUS_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_ZEROPLUS [=y]
Selected by [m]:
- HID_ACRUX_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_ACRUX [=m]
- HID_EMS_FF [=m] && HID_SUPPORT [=y] && HID [=y]
- HID_GOOGLE_STADIA_FF [=m] && HID_SUPPORT [=y] && HID [=y]
- PANTHERLORD_FF [=y] && HID_SUPPORT [=y] && HID [=y] && HID_PANTHERLORD [=m]

It's better to be consistent and always use 'depends on HID' for HID
drivers. The notable exception here is USB_KBD/USB_MOUSE, which are
alternative implementations that do not depend on the HID subsystem.

Do this by extending the "if HID" section below, which means that a few
of the duplicate "depends on HID" and "depends on INPUT" statements
can be removed in the process.

Fixes: 1b2d05384c29 ("HID: intel-thc-hid: Add basic THC driver skeleton")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
Reviewed-by: Even Xu <even.xu@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>

authored by

Arnd Bergmann and committed by
Jiri Kosina
a5a056c8 52572cde

+9 -14
+6 -4
drivers/hid/Kconfig
··· 1376 1376 1377 1377 source "drivers/hid/bpf/Kconfig" 1378 1378 1379 - endif # HID 1380 - 1381 - source "drivers/hid/usbhid/Kconfig" 1382 - 1383 1379 source "drivers/hid/i2c-hid/Kconfig" 1384 1380 1385 1381 source "drivers/hid/intel-ish-hid/Kconfig" ··· 1385 1389 source "drivers/hid/surface-hid/Kconfig" 1386 1390 1387 1391 source "drivers/hid/intel-thc-hid/Kconfig" 1392 + 1393 + endif # HID 1394 + 1395 + # USB support may be used with HID disabled 1396 + 1397 + source "drivers/hid/usbhid/Kconfig" 1388 1398 1389 1399 endif # HID_SUPPORT
-1
drivers/hid/amd-sfh-hid/Kconfig
··· 5 5 6 6 config AMD_SFH_HID 7 7 tristate "AMD Sensor Fusion Hub" 8 - depends on HID 9 8 depends on X86 10 9 help 11 10 If you say yes to this option, support will be included for the
+1 -1
drivers/hid/i2c-hid/Kconfig
··· 2 2 menuconfig I2C_HID 3 3 tristate "I2C HID support" 4 4 default y 5 - depends on I2C && INPUT && HID 5 + depends on I2C 6 6 7 7 if I2C_HID 8 8
-1
drivers/hid/intel-ish-hid/Kconfig
··· 6 6 tristate "Intel Integrated Sensor Hub" 7 7 default n 8 8 depends on X86 9 - depends on HID 10 9 help 11 10 The Integrated Sensor Hub (ISH) enables the ability to offload 12 11 sensor polling and algorithm processing to a dedicated low power
-1
drivers/hid/intel-thc-hid/Kconfig
··· 7 7 config INTEL_THC_HID 8 8 tristate "Intel Touch Host Controller" 9 9 depends on ACPI 10 - select HID 11 10 help 12 11 THC (Touch Host Controller) is the name of the IP block in PCH that 13 12 interfaces with Touch Devices (ex: touchscreen, touchpad etc.). It
-2
drivers/hid/surface-hid/Kconfig
··· 1 1 # SPDX-License-Identifier: GPL-2.0+ 2 2 menu "Surface System Aggregator Module HID support" 3 3 depends on SURFACE_AGGREGATOR 4 - depends on INPUT 5 4 6 5 config SURFACE_HID 7 6 tristate "HID transport driver for Surface System Aggregator Module" ··· 38 39 39 40 config SURFACE_HID_CORE 40 41 tristate 41 - select HID
+1 -2
drivers/hid/usbhid/Kconfig
··· 5 5 config USB_HID 6 6 tristate "USB HID transport layer" 7 7 default y 8 - depends on USB && INPUT 9 - select HID 8 + depends on HID 10 9 help 11 10 Say Y here if you want to connect USB keyboards, 12 11 mice, joysticks, graphic tablets, or any other HID based devices
+1 -2
net/bluetooth/hidp/Kconfig
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 config BT_HIDP 3 3 tristate "HIDP protocol support" 4 - depends on BT_BREDR && INPUT && HID_SUPPORT 5 - select HID 4 + depends on BT_BREDR && HID 6 5 help 7 6 HIDP (Human Interface Device Protocol) is a transport layer 8 7 for HID reports. HIDP is required for the Bluetooth Human