Skip to content

Commit 6db3dfe

Browse files
author
Jiri Kosina
committed
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>
1 parent a21bd69 commit 6db3dfe

18 files changed

Lines changed: 190 additions & 176 deletions

File tree

‎drivers/hid/Kconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,7 @@ config HID_DEBUG
3636

3737
If unsure, say N
3838

39+
source "drivers/hid/usbhid/Kconfig"
40+
3941
endmenu
4042

‎drivers/hid/Makefile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ hid-objs := hid-core.o hid-input.o
66
obj-$(CONFIG_HID) += hid.o
77
hid-$(CONFIG_HID_DEBUG) += hid-debug.o
88

9+
obj-$(CONFIG_USB_HID) += usbhid/
10+
obj-$(CONFIG_USB_MOUSE) += usbhid/
11+
obj-$(CONFIG_USB_KBD) += usbhid/
12+

‎drivers/hid/usbhid/Kconfig‎

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
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+

‎drivers/hid/usbhid/Makefile‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+

0 commit comments

Comments
 (0)