Skip to content

Commit e0da5c9

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID updates from Jiri Kosina: - i2c-hid is not querying init reports any more, as it's not mandated by the spec, and annoys quite a few devices during enumeration, by Bibek Basu - a lot of fixes for Logitech devices, by Simon Wood - hid-apple now has an option to switch between Option and Command mode, by Nanno Langstraat - Some more workarounds for severely broken ELO devices, by Oliver Neukum - more devm conversions, by Benjamin Tissoires - wiimote correctness fixes, by David Herrmann - a lot of added support for various new device IDs and random small fixes here and there" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (34 commits) HID: enable Mayflash USB Gamecube Adapter HID: sony: Add force feedback support for Dualshock3 USB Input: usbtouchscreen: ignore eGalax/D-Wav/EETI HIDs HID: don't ignore eGalax/D-Wav/EETI HIDs HID: roccat: add missing special driver declarations HID:hid-lg4ff: Correct Auto-center strength for wheels other than MOMO and MOMO2 HID:hid-lg4ff: Initialize device properties before we touch autocentering. HID:hid-lg4ff: ensure ConstantForce is disabled when set to 0 HID:hid-lg4ff: Switch autocentering off when strength is set to zero. HID:hid-lg4ff: Scale autocentering force properly on Logitech wheel HID: roccat: fix Coverity CID 141438 HID: multitouch: add manufacturer to Kconfig help text HID: logitech-dj: small cleanup in rdcat() HID: remove self-assignment from hid_input_report HID: hid-sensor-hub: fix report size HID: i2c-hid: Stop querying for init reports HID: roccat: add support for Ryos MK keyboards HID: roccat: generalize some common code HID: roccat: add new device return value HID: wiimote: add pro-controller analog stick calibration ...
2 parents 9073e1a + 7f9cc24 commit e0da5c9

31 files changed

+1168
-451
lines changed
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/control
2+
Date: October 2013
3+
Contact: Stefan Achatz <[email protected]>
4+
Description: When written, this file lets one select which data from which
5+
profile will be read next. The data has to be 3 bytes long.
6+
This file is writeonly.
7+
Users: http://roccat.sourceforge.net
8+
9+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/profile
10+
Date: October 2013
11+
Contact: Stefan Achatz <[email protected]>
12+
Description: The mouse can store 5 profiles which can be switched by the
13+
press of a button. profile holds index of actual profile.
14+
This value is persistent, so its value determines the profile
15+
that's active when the device is powered on next time.
16+
When written, the device activates the set profile immediately.
17+
The data has to be 3 bytes long.
18+
The device will reject invalid data.
19+
Users: http://roccat.sourceforge.net
20+
21+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/keys_primary
22+
Date: October 2013
23+
Contact: Stefan Achatz <[email protected]>
24+
Description: When written, this file lets one set the default of all keys for
25+
a specific profile. Profile index is included in written data.
26+
The data has to be 125 bytes long.
27+
Before reading this file, control has to be written to select
28+
which profile to read.
29+
Users: http://roccat.sourceforge.net
30+
31+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/keys_function
32+
Date: October 2013
33+
Contact: Stefan Achatz <[email protected]>
34+
Description: When written, this file lets one set the function of the
35+
function keys for a specific profile. Profile index is included
36+
in written data. The data has to be 95 bytes long.
37+
Before reading this file, control has to be written to select
38+
which profile to read.
39+
Users: http://roccat.sourceforge.net
40+
41+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/keys_macro
42+
Date: October 2013
43+
Contact: Stefan Achatz <[email protected]>
44+
Description: When written, this file lets one set the function of the macro
45+
keys for a specific profile. Profile index is included in
46+
written data. The data has to be 35 bytes long.
47+
Before reading this file, control has to be written to select
48+
which profile to read.
49+
Users: http://roccat.sourceforge.net
50+
51+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/keys_thumbster
52+
Date: October 2013
53+
Contact: Stefan Achatz <[email protected]>
54+
Description: When written, this file lets one set the function of the
55+
thumbster keys for a specific profile. Profile index is included
56+
in written data. The data has to be 23 bytes long.
57+
Before reading this file, control has to be written to select
58+
which profile to read.
59+
Users: http://roccat.sourceforge.net
60+
61+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/keys_extra
62+
Date: October 2013
63+
Contact: Stefan Achatz <[email protected]>
64+
Description: When written, this file lets one set the function of the
65+
capslock and function keys for a specific profile. Profile index
66+
is included in written data. The data has to be 8 bytes long.
67+
Before reading this file, control has to be written to select
68+
which profile to read.
69+
Users: http://roccat.sourceforge.net
70+
71+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/keys_easyzone
72+
Date: October 2013
73+
Contact: Stefan Achatz <[email protected]>
74+
Description: When written, this file lets one set the function of the
75+
easyzone keys for a specific profile. Profile index is included
76+
in written data. The data has to be 294 bytes long.
77+
Before reading this file, control has to be written to select
78+
which profile to read.
79+
Users: http://roccat.sourceforge.net
80+
81+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/key_mask
82+
Date: October 2013
83+
Contact: Stefan Achatz <[email protected]>
84+
Description: When written, this file lets one deactivate certain keys like
85+
windows and application keys, to prevent accidental presses.
86+
Profile index for which this settings occur is included in
87+
written data. The data has to be 6 bytes long.
88+
Before reading this file, control has to be written to select
89+
which profile to read.
90+
Users: http://roccat.sourceforge.net
91+
92+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/light
93+
Date: October 2013
94+
Contact: Stefan Achatz <[email protected]>
95+
Description: When written, this file lets one set the backlight intensity for
96+
a specific profile. Profile index is included in written data.
97+
This attribute is only valid for the glow and pro variant.
98+
The data has to be 16 bytes long.
99+
Before reading this file, control has to be written to select
100+
which profile to read.
101+
Users: http://roccat.sourceforge.net
102+
103+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/macro
104+
Date: October 2013
105+
Contact: Stefan Achatz <[email protected]>
106+
Description: When written, this file lets one store macros with max 480
107+
keystrokes for a specific button for a specific profile.
108+
Button and profile indexes are included in written data.
109+
The data has to be 2002 bytes long.
110+
Before reading this file, control has to be written to select
111+
which profile and key to read.
112+
Users: http://roccat.sourceforge.net
113+
114+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/info
115+
Date: October 2013
116+
Contact: Stefan Achatz <[email protected]>
117+
Description: When read, this file returns general data like firmware version.
118+
The data is 8 bytes long.
119+
This file is readonly.
120+
Users: http://roccat.sourceforge.net
121+
122+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/reset
123+
Date: October 2013
124+
Contact: Stefan Achatz <[email protected]>
125+
Description: When written, this file lets one reset the device.
126+
The data has to be 3 bytes long.
127+
This file is writeonly.
128+
Users: http://roccat.sourceforge.net
129+
130+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/talk
131+
Date: October 2013
132+
Contact: Stefan Achatz <[email protected]>
133+
Description: When written, this file lets one trigger easyshift functionality
134+
from the host.
135+
The data has to be 16 bytes long.
136+
This file is writeonly.
137+
Users: http://roccat.sourceforge.net
138+
139+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/light_control
140+
Date: October 2013
141+
Contact: Stefan Achatz <[email protected]>
142+
Description: When written, this file lets one switch between stored and custom
143+
light settings.
144+
This attribute is only valid for the pro variant.
145+
The data has to be 8 bytes long.
146+
This file is writeonly.
147+
Users: http://roccat.sourceforge.net
148+
149+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/stored_lights
150+
Date: October 2013
151+
Contact: Stefan Achatz <[email protected]>
152+
Description: When written, this file lets one set per-key lighting for different
153+
layers.
154+
This attribute is only valid for the pro variant.
155+
The data has to be 1382 bytes long.
156+
Before reading this file, control has to be written to select
157+
which profile to read.
158+
Users: http://roccat.sourceforge.net
159+
160+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/custom_lights
161+
Date: October 2013
162+
Contact: Stefan Achatz <[email protected]>
163+
Description: When written, this file lets one set the actual per-key lighting.
164+
This attribute is only valid for the pro variant.
165+
The data has to be 20 bytes long.
166+
This file is writeonly.
167+
Users: http://roccat.sourceforge.net
168+
169+
What: /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-bus>:<vendor-id>:<product-id>.<num>/ryos/roccatryos<minor>/light_macro
170+
Date: October 2013
171+
Contact: Stefan Achatz <[email protected]>
172+
Description: When written, this file lets one set a light macro that is looped
173+
whenever the device gets in dimness mode.
174+
This attribute is only valid for the pro variant.
175+
The data has to be 2002 bytes long.
176+
Before reading this file, control has to be written to select
177+
which profile to read.
178+
Users: http://roccat.sourceforge.net

Documentation/ABI/testing/sysfs-driver-hid-wiimote

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,21 @@ Description: This attribute is only provided if the device was detected as a
5757
Calibration data is already applied by the kernel to all input
5858
values but may be used by user-space to perform other
5959
transformations.
60+
61+
What: /sys/bus/hid/drivers/wiimote/<dev>/pro_calib
62+
Date: October 2013
63+
KernelVersion: 3.13
64+
Contact: David Herrmann <[email protected]>
65+
Description: This attribute is only provided if the device was detected as a
66+
pro-controller. It provides a single line with 4 calibration
67+
values for all 4 analog sticks. Format is: "x1:y1 x2:y2". Data
68+
is prefixed with a +/-. Each value is a signed 16bit number.
69+
Data is encoded as decimal numbers and specifies the offsets of
70+
the analog sticks of the pro-controller.
71+
Calibration data is already applied by the kernel to all input
72+
values but may be used by user-space to perform other
73+
transformations.
74+
Calibration data is detected by the kernel during device setup.
75+
You can write "scan\n" into this file to re-trigger calibration.
76+
You can also write data directly in the form "x1:y1 x2:y2" to
77+
set the calibration values manually.

drivers/hid/Kconfig

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ config HID_HOLTEK
242242
- Tracer Sniper TRM-503 / NOVA Gaming Slider X200 /
243243
Zalman ZM-GM1
244244
- SHARKOON DarkGlider Gaming mouse
245+
- LEETGION Hellion Gaming Mouse
245246

246247
config HOLTEK_FF
247248
bool "Holtek On Line Grip force feedback support"
@@ -323,7 +324,7 @@ config HID_LCPOWER
323324

324325
config HID_LENOVO_TPKBD
325326
tristate "Lenovo ThinkPad USB Keyboard with TrackPoint"
326-
depends on USB_HID
327+
depends on HID
327328
select NEW_LEDS
328329
select LEDS_CLASS
329330
---help---
@@ -362,19 +363,20 @@ config LOGITECH_FF
362363
- Logitech WingMan Force 3D
363364
- Logitech Formula Force EX
364365
- Logitech WingMan Formula Force GP
365-
- Logitech MOMO Force wheel
366366

367367
and if you want to enable force feedback for them.
368368
Note: if you say N here, this device will still be supported, but without
369369
force feedback.
370370

371371
config LOGIRUMBLEPAD2_FF
372-
bool "Logitech RumblePad/Rumblepad 2 force feedback support"
372+
bool "Logitech force feedback support (variant 2)"
373373
depends on HID_LOGITECH
374374
select INPUT_FF_MEMLESS
375375
help
376-
Say Y here if you want to enable force feedback support for Logitech
377-
RumblePad and Rumblepad 2 devices.
376+
Say Y here if you want to enable force feedback support for:
377+
- Logitech RumblePad
378+
- Logitech Rumblepad 2
379+
- Logitech Formula Vibration Feedback Wheel
378380

379381
config LOGIG940_FF
380382
bool "Logitech Flight System G940 force feedback support"
@@ -437,6 +439,7 @@ config HID_MULTITOUCH
437439
- Chunghwa panels
438440
- CVTouch panels
439441
- Cypress TrueTouch panels
442+
- Elan Microelectronics touch panels
440443
- Elo TouchSystems IntelliTouch Plus panels
441444
- GeneralTouch 'Sensing Win7-TwoFinger' panels
442445
- GoodTouch panels
@@ -453,6 +456,7 @@ config HID_MULTITOUCH
453456
- Pixcir dual touch panels
454457
- Quanta panels
455458
- eGalax dual-touch panels, including the Joojoo and Wetab tablets
459+
- SiS multitouch panels
456460
- Stantum multitouch panels
457461
- Touch International Panels
458462
- Unitec Panels
@@ -614,6 +618,14 @@ config HID_SONY
614618
* Sony PS3 Blue-ray Disk Remote Control (Bluetooth)
615619
* Logitech Harmony adapter for Sony Playstation 3 (Bluetooth)
616620

621+
config SONY_FF
622+
bool "Sony PS2/3 accessories force feedback support"
623+
depends on HID_SONY
624+
select INPUT_FF_MEMLESS
625+
---help---
626+
Say Y here if you have a Sony PS2/3 accessory and want to enable force
627+
feedback support for it.
628+
617629
config HID_SPEEDLINK
618630
tristate "Speedlink VAD Cezanne mouse support"
619631
depends on HID

drivers/hid/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ obj-$(CONFIG_HID_PRIMAX) += hid-primax.o
9595
obj-$(CONFIG_HID_ROCCAT) += hid-roccat.o hid-roccat-common.o \
9696
hid-roccat-arvo.o hid-roccat-isku.o hid-roccat-kone.o \
9797
hid-roccat-koneplus.o hid-roccat-konepure.o hid-roccat-kovaplus.o \
98-
hid-roccat-lua.o hid-roccat-pyra.o hid-roccat-savu.o
98+
hid-roccat-lua.o hid-roccat-pyra.o hid-roccat-ryos.o hid-roccat-savu.o
9999
obj-$(CONFIG_HID_SAITEK) += hid-saitek.o
100100
obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o
101101
obj-$(CONFIG_HID_SMARTJOYPLUS) += hid-sjoy.o

drivers/hid/hid-apple.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ module_param(iso_layout, uint, 0644);
4646
MODULE_PARM_DESC(iso_layout, "Enable/Disable hardcoded ISO-layout of the keyboard. "
4747
"(0 = disabled, [1] = enabled)");
4848

49+
static unsigned int swap_opt_cmd;
50+
module_param(swap_opt_cmd, uint, 0644);
51+
MODULE_PARM_DESC(swap_opt_cmd, "Swap the Option (\"Alt\") and Command (\"Flag\") keys. "
52+
"(For people who want to keep Windows PC keyboard muscle memory. "
53+
"[0] = as-is, Mac layout. 1 = swapped, Windows layout.)");
54+
4955
struct apple_sc {
5056
unsigned long quirks;
5157
unsigned int fn_on;
@@ -150,6 +156,14 @@ static const struct apple_key_translation apple_iso_keyboard[] = {
150156
{ }
151157
};
152158

159+
static const struct apple_key_translation swapped_option_cmd_keys[] = {
160+
{ KEY_LEFTALT, KEY_LEFTMETA },
161+
{ KEY_LEFTMETA, KEY_LEFTALT },
162+
{ KEY_RIGHTALT, KEY_RIGHTMETA },
163+
{ KEY_RIGHTMETA,KEY_RIGHTALT },
164+
{ }
165+
};
166+
153167
static const struct apple_key_translation *apple_find_translation(
154168
const struct apple_key_translation *table, u16 from)
155169
{
@@ -242,6 +256,14 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
242256
}
243257
}
244258

259+
if (swap_opt_cmd) {
260+
trans = apple_find_translation(swapped_option_cmd_keys, usage->code);
261+
if (trans) {
262+
input_event(input, usage->type, trans->to, value);
263+
return 1;
264+
}
265+
}
266+
245267
return 0;
246268
}
247269

drivers/hid/hid-axff.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static int axff_init(struct hid_device *hid)
9595
}
9696
}
9797

98-
if (field_count < 4) {
98+
if (field_count < 4 && hid->product != 0xf705) {
9999
hid_err(hid, "not enough fields in the report: %d\n",
100100
field_count);
101101
return -ENODEV;
@@ -180,6 +180,7 @@ static void ax_remove(struct hid_device *hdev)
180180

181181
static const struct hid_device_id ax_devices[] = {
182182
{ HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802), },
183+
{ HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0xf705), },
183184
{ }
184185
};
185186
MODULE_DEVICE_TABLE(hid, ax_devices);

0 commit comments

Comments
 (0)