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

USB HID: move usbhid code from drivers/usb/input to drivers/hid/usbhid

Separate usbhid code into dedicated drivers/hid/usbhid directory as
discussed previously with Greg, so that it eases maintaineance process.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

+190 -176
+2
drivers/hid/Kconfig
··· 36 36 37 37 If unsure, say N 38 38 39 + source "drivers/hid/usbhid/Kconfig" 40 + 39 41 endmenu 40 42
+4
drivers/hid/Makefile
··· 6 6 obj-$(CONFIG_HID) += hid.o 7 7 hid-$(CONFIG_HID_DEBUG) += hid-debug.o 8 8 9 + obj-$(CONFIG_USB_HID) += usbhid/ 10 + obj-$(CONFIG_USB_MOUSE) += usbhid/ 11 + obj-$(CONFIG_USB_KBD) += usbhid/ 12 +
+149
drivers/hid/usbhid/Kconfig
··· 1 + comment "USB Input Devices" 2 + depends on USB 3 + 4 + config USB_HID 5 + tristate "USB Human Interface Device (full HID) support" 6 + default y 7 + depends on USB && INPUT 8 + select HID 9 + ---help--- 10 + Say Y here if you want full HID support to connect USB keyboards, 11 + mice, joysticks, graphic tablets, or any other HID based devices 12 + to your computer via USB, as well as Uninterruptible Power Supply 13 + (UPS) and monitor control devices. 14 + 15 + You can't use this driver and the HIDBP (Boot Protocol) keyboard 16 + and mouse drivers at the same time. More information is available: 17 + <file:Documentation/input/input.txt>. 18 + 19 + If unsure, say Y. 20 + 21 + To compile this driver as a module, choose M here: the 22 + module will be called usbhid. 23 + 24 + comment "Input core support is needed for USB HID input layer or HIDBP support" 25 + depends on USB_HID && INPUT=n 26 + 27 + config USB_HIDINPUT_POWERBOOK 28 + bool "Enable support for iBook/PowerBook special keys" 29 + default n 30 + depends on USB_HID 31 + help 32 + Say Y here if you want support for the special keys (Fn, Numlock) on 33 + Apple iBooks and PowerBooks. 34 + 35 + If unsure, say N. 36 + 37 + config HID_FF 38 + bool "Force feedback support (EXPERIMENTAL)" 39 + depends on USB_HID && EXPERIMENTAL 40 + help 41 + Say Y here is you want force feedback support for a few HID devices. 42 + See below for a list of supported devices. 43 + 44 + See <file:Documentation/input/ff.txt> for a description of the force 45 + feedback API. 46 + 47 + If unsure, say N. 48 + 49 + config HID_PID 50 + bool "PID device support" 51 + depends on HID_FF 52 + help 53 + Say Y here if you have a PID-compliant device and wish to enable force 54 + feedback for it. Microsoft Sidewinder Force Feedback 2 is one of such 55 + devices. 56 + 57 + config LOGITECH_FF 58 + bool "Logitech devices support" 59 + depends on HID_FF 60 + select INPUT_FF_MEMLESS if USB_HID 61 + help 62 + Say Y here if you have one of these devices: 63 + - Logitech WingMan Cordless RumblePad 64 + - Logitech WingMan Cordless RumblePad 2 65 + - Logitech WingMan Force 3D 66 + - Logitech Formula Force EX 67 + - Logitech MOMO Force wheel 68 + 69 + and if you want to enable force feedback for them. 70 + Note: if you say N here, this device will still be supported, but without 71 + force feedback. 72 + 73 + config PANTHERLORD_FF 74 + bool "PantherLord USB/PS2 2in1 Adapter support" 75 + depends on HID_FF 76 + select INPUT_FF_MEMLESS if USB_HID 77 + help 78 + Say Y here if you have a PantherLord USB/PS2 2in1 Adapter and want 79 + to enable force feedback support for it. 80 + 81 + config THRUSTMASTER_FF 82 + bool "ThrustMaster FireStorm Dual Power 2 support (EXPERIMENTAL)" 83 + depends on HID_FF && EXPERIMENTAL 84 + select INPUT_FF_MEMLESS if USB_HID 85 + help 86 + Say Y here if you have a THRUSTMASTER FireStore Dual Power 2, 87 + and want to enable force feedback support for it. 88 + Note: if you say N here, this device will still be supported, but without 89 + force feedback. 90 + 91 + config ZEROPLUS_FF 92 + bool "Zeroplus based game controller support" 93 + depends on HID_FF 94 + select INPUT_FF_MEMLESS if USB_HID 95 + help 96 + Say Y here if you have a Zeroplus based game controller and want to 97 + enable force feedback for it. 98 + 99 + config USB_HIDDEV 100 + bool "/dev/hiddev raw HID device support" 101 + depends on USB_HID 102 + help 103 + Say Y here if you want to support HID devices (from the USB 104 + specification standpoint) that aren't strictly user interface 105 + devices, like monitor controls and Uninterruptable Power Supplies. 106 + 107 + This module supports these devices separately using a separate 108 + event interface on /dev/usb/hiddevX (char 180:96 to 180:111). 109 + 110 + If unsure, say Y. 111 + 112 + menu "USB HID Boot Protocol drivers" 113 + depends on USB!=n && USB_HID!=y 114 + 115 + config USB_KBD 116 + tristate "USB HIDBP Keyboard (simple Boot) support" 117 + depends on USB && INPUT 118 + ---help--- 119 + Say Y here only if you are absolutely sure that you don't want 120 + to use the generic HID driver for your USB keyboard and prefer 121 + to use the keyboard in its limited Boot Protocol mode instead. 122 + 123 + This is almost certainly not what you want. This is mostly 124 + useful for embedded applications or simple keyboards. 125 + 126 + To compile this driver as a module, choose M here: the 127 + module will be called usbkbd. 128 + 129 + If even remotely unsure, say N. 130 + 131 + config USB_MOUSE 132 + tristate "USB HIDBP Mouse (simple Boot) support" 133 + depends on USB && INPUT 134 + ---help--- 135 + Say Y here only if you are absolutely sure that you don't want 136 + to use the generic HID driver for your USB mouse and prefer 137 + to use the mouse in its limited Boot Protocol mode instead. 138 + 139 + This is almost certainly not what you want. This is mostly 140 + useful for embedded applications or simple mice. 141 + 142 + To compile this driver as a module, choose M here: the 143 + module will be called usbmouse. 144 + 145 + If even remotely unsure, say N. 146 + 147 + endmenu 148 + 149 +
+35
drivers/hid/usbhid/Makefile
··· 1 + # 2 + # Makefile for the USB input drivers 3 + # 4 + 5 + # Multipart objects. 6 + usbhid-objs := hid-core.o 7 + 8 + # Optional parts of multipart objects. 9 + 10 + ifeq ($(CONFIG_USB_HIDDEV),y) 11 + usbhid-objs += hiddev.o 12 + endif 13 + ifeq ($(CONFIG_HID_PID),y) 14 + usbhid-objs += hid-pidff.o 15 + endif 16 + ifeq ($(CONFIG_LOGITECH_FF),y) 17 + usbhid-objs += hid-lgff.o 18 + endif 19 + ifeq ($(CONFIG_PANTHERLORD_FF),y) 20 + usbhid-objs += hid-plff.o 21 + endif 22 + ifeq ($(CONFIG_THRUSTMASTER_FF),y) 23 + usbhid-objs += hid-tmff.o 24 + endif 25 + ifeq ($(CONFIG_ZEROPLUS_FF),y) 26 + usbhid-objs += hid-zpff.o 27 + endif 28 + ifeq ($(CONFIG_HID_FF),y) 29 + usbhid-objs += hid-ff.o 30 + endif 31 + 32 + obj-$(CONFIG_USB_HID) += usbhid.o 33 + obj-$(CONFIG_USB_KBD) += usbkbd.o 34 + obj-$(CONFIG_USB_MOUSE) += usbmouse.o 35 +
-3
drivers/usb/Makefile
··· 27 27 obj-$(CONFIG_USB_ACECAD) += input/ 28 28 obj-$(CONFIG_USB_AIPTEK) += input/ 29 29 obj-$(CONFIG_USB_ATI_REMOTE) += input/ 30 - obj-$(CONFIG_USB_HID) += input/ 31 - obj-$(CONFIG_USB_KBD) += input/ 32 30 obj-$(CONFIG_USB_KBTAB) += input/ 33 - obj-$(CONFIG_USB_MOUSE) += input/ 34 31 obj-$(CONFIG_USB_MTOUCH) += input/ 35 32 obj-$(CONFIG_USB_POWERMATE) += input/ 36 33 obj-$(CONFIG_USB_WACOM) += input/
-145
drivers/usb/input/Kconfig
··· 4 4 comment "USB Input Devices" 5 5 depends on USB 6 6 7 - config USB_HID 8 - tristate "USB Human Interface Device (full HID) support" 9 - default y 10 - depends on USB && INPUT 11 - select HID 12 - ---help--- 13 - Say Y here if you want full HID support to connect USB keyboards, 14 - mice, joysticks, graphic tablets, or any other HID based devices 15 - to your computer via USB, as well as Uninterruptible Power Supply 16 - (UPS) and monitor control devices. 17 - 18 - You can't use this driver and the HIDBP (Boot Protocol) keyboard 19 - and mouse drivers at the same time. More information is available: 20 - <file:Documentation/input/input.txt>. 21 - 22 - If unsure, say Y. 23 - 24 - To compile this driver as a module, choose M here: the 25 - module will be called usbhid. 26 - 27 - comment "Input core support is needed for USB HID input layer or HIDBP support" 28 - depends on USB_HID && INPUT=n 29 - 30 - config USB_HIDINPUT_POWERBOOK 31 - bool "Enable support for iBook/PowerBook special keys" 32 - default n 33 - depends on USB_HID 34 - help 35 - Say Y here if you want support for the special keys (Fn, Numlock) on 36 - Apple iBooks and PowerBooks. 37 - 38 - If unsure, say N. 39 - 40 - config HID_FF 41 - bool "Force feedback support (EXPERIMENTAL)" 42 - depends on USB_HID && EXPERIMENTAL 43 - help 44 - Say Y here is you want force feedback support for a few HID devices. 45 - See below for a list of supported devices. 46 - 47 - See <file:Documentation/input/ff.txt> for a description of the force 48 - feedback API. 49 - 50 - If unsure, say N. 51 - 52 - config HID_PID 53 - bool "PID device support" 54 - depends on HID_FF 55 - help 56 - Say Y here if you have a PID-compliant device and wish to enable force 57 - feedback for it. Microsoft Sidewinder Force Feedback 2 is one of such 58 - devices. 59 - 60 - config LOGITECH_FF 61 - bool "Logitech devices support" 62 - depends on HID_FF 63 - select INPUT_FF_MEMLESS if USB_HID 64 - help 65 - Say Y here if you have one of these devices: 66 - - Logitech WingMan Cordless RumblePad 67 - - Logitech WingMan Cordless RumblePad 2 68 - - Logitech WingMan Force 3D 69 - - Logitech Formula Force EX 70 - - Logitech MOMO Force wheel 71 - 72 - and if you want to enable force feedback for them. 73 - Note: if you say N here, this device will still be supported, but without 74 - force feedback. 75 - 76 - config PANTHERLORD_FF 77 - bool "PantherLord USB/PS2 2in1 Adapter support" 78 - depends on HID_FF 79 - select INPUT_FF_MEMLESS if USB_HID 80 - help 81 - Say Y here if you have a PantherLord USB/PS2 2in1 Adapter and want 82 - to enable force feedback support for it. 83 - 84 - config THRUSTMASTER_FF 85 - bool "ThrustMaster FireStorm Dual Power 2 support (EXPERIMENTAL)" 86 - depends on HID_FF && EXPERIMENTAL 87 - select INPUT_FF_MEMLESS if USB_HID 88 - help 89 - Say Y here if you have a THRUSTMASTER FireStore Dual Power 2, 90 - and want to enable force feedback support for it. 91 - Note: if you say N here, this device will still be supported, but without 92 - force feedback. 93 - 94 - config ZEROPLUS_FF 95 - bool "Zeroplus based game controller support" 96 - depends on HID_FF 97 - select INPUT_FF_MEMLESS if USB_HID 98 - help 99 - Say Y here if you have a Zeroplus based game controller and want to 100 - enable force feedback for it. 101 - 102 - config USB_HIDDEV 103 - bool "/dev/hiddev raw HID device support" 104 - depends on USB_HID 105 - help 106 - Say Y here if you want to support HID devices (from the USB 107 - specification standpoint) that aren't strictly user interface 108 - devices, like monitor controls and Uninterruptable Power Supplies. 109 - 110 - This module supports these devices separately using a separate 111 - event interface on /dev/usb/hiddevX (char 180:96 to 180:111). 112 - 113 - If unsure, say Y. 114 - 115 - menu "USB HID Boot Protocol drivers" 116 - depends on USB!=n && USB_HID!=y 117 - 118 - config USB_KBD 119 - tristate "USB HIDBP Keyboard (simple Boot) support" 120 - depends on USB && INPUT 121 - ---help--- 122 - Say Y here only if you are absolutely sure that you don't want 123 - to use the generic HID driver for your USB keyboard and prefer 124 - to use the keyboard in its limited Boot Protocol mode instead. 125 - 126 - This is almost certainly not what you want. This is mostly 127 - useful for embedded applications or simple keyboards. 128 - 129 - To compile this driver as a module, choose M here: the 130 - module will be called usbkbd. 131 - 132 - If even remotely unsure, say N. 133 - 134 - config USB_MOUSE 135 - tristate "USB HIDBP Mouse (simple Boot) support" 136 - depends on USB && INPUT 137 - ---help--- 138 - Say Y here only if you are absolutely sure that you don't want 139 - to use the generic HID driver for your USB mouse and prefer 140 - to use the mouse in its limited Boot Protocol mode instead. 141 - 142 - This is almost certainly not what you want. This is mostly 143 - useful for embedded applications or simple mice. 144 - 145 - To compile this driver as a module, choose M here: the 146 - module will be called usbmouse. 147 - 148 - If even remotely unsure, say N. 149 - 150 - endmenu 151 - 152 7 config USB_AIPTEK 153 8 tristate "Aiptek 6000U/8000U tablet support" 154 9 depends on USB && INPUT
-28
drivers/usb/input/Makefile
··· 4 4 5 5 # Multipart objects. 6 6 wacom-objs := wacom_wac.o wacom_sys.o 7 - usbhid-objs := hid-core.o 8 - 9 - # Optional parts of multipart objects. 10 - 11 - ifeq ($(CONFIG_USB_HIDDEV),y) 12 - usbhid-objs += hiddev.o 13 - endif 14 - ifeq ($(CONFIG_HID_PID),y) 15 - usbhid-objs += hid-pidff.o 16 - endif 17 - ifeq ($(CONFIG_LOGITECH_FF),y) 18 - usbhid-objs += hid-lgff.o 19 - endif 20 - ifeq ($(CONFIG_PANTHERLORD_FF),y) 21 - usbhid-objs += hid-plff.o 22 - endif 23 - ifeq ($(CONFIG_THRUSTMASTER_FF),y) 24 - usbhid-objs += hid-tmff.o 25 - endif 26 - ifeq ($(CONFIG_ZEROPLUS_FF),y) 27 - usbhid-objs += hid-zpff.o 28 - endif 29 - ifeq ($(CONFIG_HID_FF),y) 30 - usbhid-objs += hid-ff.o 31 - endif 32 7 33 8 obj-$(CONFIG_USB_AIPTEK) += aiptek.o 34 9 obj-$(CONFIG_USB_ATI_REMOTE) += ati_remote.o 35 10 obj-$(CONFIG_USB_ATI_REMOTE2) += ati_remote2.o 36 - obj-$(CONFIG_USB_HID) += usbhid.o 37 - obj-$(CONFIG_USB_KBD) += usbkbd.o 38 11 obj-$(CONFIG_USB_KBTAB) += kbtab.o 39 12 obj-$(CONFIG_USB_KEYSPAN_REMOTE) += keyspan_remote.o 40 - obj-$(CONFIG_USB_MOUSE) += usbmouse.o 41 13 obj-$(CONFIG_USB_MTOUCH) += mtouchusb.o 42 14 obj-$(CONFIG_USB_ITMTOUCH) += itmtouch.o 43 15 obj-$(CONFIG_USB_EGALAX) += touchkitusb.o
drivers/usb/input/hid-core.c drivers/hid/usbhid/hid-core.c
drivers/usb/input/hid-ff.c drivers/hid/usbhid/hid-ff.c
drivers/usb/input/hid-lgff.c drivers/hid/usbhid/hid-lgff.c
drivers/usb/input/hid-pidff.c drivers/hid/usbhid/hid-pidff.c
drivers/usb/input/hid-plff.c drivers/hid/usbhid/hid-plff.c
drivers/usb/input/hid-tmff.c drivers/hid/usbhid/hid-tmff.c
drivers/usb/input/hid-zpff.c drivers/hid/usbhid/hid-zpff.c
drivers/usb/input/hiddev.c drivers/hid/usbhid/hiddev.c
drivers/usb/input/usbhid.h drivers/hid/usbhid/usbhid.h
drivers/usb/input/usbkbd.c drivers/hid/usbhid/usbkbd.c
drivers/usb/input/usbmouse.c drivers/hid/usbhid/usbmouse.c