Skip to content

Commit 31dced4

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (61 commits) HID: hid-magicmouse: Magic Trackpad has 1 button, not 2 HID: Add device IDs for more SJOY adapters HID: primax: remove spurious dependency HID: support primax keyboards violating USB HID spec HID: usbhid: cancel timer for retry synchronously HID: wacom: Set input bits before registration HID: consolidate MacbookAir 4,1 mappings HID: MacbookAir4,1 and MacbookAir4,2 need entry in hid_mouse_ignore_list[] HID: Add support MacbookAir 4,1 keyboard HID: hidraw: open count should not increase if error HID: hiddev: potential info leak in hiddev_ioctl() HID: multitouch: decide if hid-multitouch needs to handle mt devices HID: add autodetection of multitouch devices HID: "hid-logitech" driver with Logitech Driving Force GT HID: hid-logitech-dj: fix off by one HID: hidraw: protect hidraw_disconnect() better HID: hid-multitouch: add support for the IDEACOM 6650 chip HID: Add full support for Logitech Unifying receivers HID: hidraw: free list for all error in hidraw_open HID: roccat: Kone now reports external profile changes via roccat device ...
2 parents 7c1953d + b3aec7b commit 31dced4

32 files changed

Lines changed: 2804 additions & 224 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
What: /sys/module/hid_logitech/drivers/hid:logitech/<dev>/range.
2+
Date: July 2011
3+
KernelVersion: 3.2
4+
Contact: Michal Mal� <madcatxster@gmail.com>
5+
Description: Display minimum, maximum and current range of the steering
6+
wheel. Writing a value within min and max boundaries sets the
7+
range of the wheel.

‎MAINTAINERS‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7147,6 +7147,12 @@ L: linux-scsi@vger.kernel.org
71477147
S: Maintained
71487148
F: drivers/scsi/wd7000.c
71497149

7150+
WIIMOTE HID DRIVER
7151+
M: David Herrmann <dh.herrmann@googlemail.com>
7152+
L: linux-input@vger.kernel.org
7153+
S: Maintained
7154+
F: drivers/hid/hid-wiimote*
7155+
71507156
WINBOND CIR DRIVER
71517157
M: David Härdeman <david@hardeman.nu>
71527158
S: Maintained

‎drivers/hid/Kconfig‎

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ config HID_ACRUX
6969
Say Y here if you want to enable support for ACRUX game controllers.
7070

7171
config HID_ACRUX_FF
72-
tristate "ACRUX force feedback support"
72+
bool "ACRUX force feedback support"
7373
depends on HID_ACRUX
7474
select INPUT_FF_MEMLESS
7575
---help---
@@ -245,6 +245,15 @@ config HID_LOGITECH
245245
---help---
246246
Support for Logitech devices that are not fully compliant with HID standard.
247247

248+
config HID_LOGITECH_DJ
249+
tristate "Logitech Unifying receivers full support"
250+
depends on HID_LOGITECH
251+
default m
252+
---help---
253+
Say Y if you want support for Logitech Unifying receivers and devices.
254+
Unifying receivers are capable of pairing up to 6 Logitech compliant
255+
devices to the same receiver.
256+
248257
config LOGITECH_FF
249258
bool "Logitech force feedback support"
250259
depends on HID_LOGITECH
@@ -278,13 +287,21 @@ config LOGIG940_FF
278287
Say Y here if you want to enable force feedback support for Logitech
279288
Flight System G940 devices.
280289

281-
config LOGIWII_FF
282-
bool "Logitech Speed Force Wireless force feedback support"
290+
config LOGIWHEELS_FF
291+
bool "Logitech wheels configuration and force feedback support"
283292
depends on HID_LOGITECH
284293
select INPUT_FF_MEMLESS
294+
default LOGITECH_FF
285295
help
286-
Say Y here if you want to enable force feedback support for Logitech
287-
Speed Force Wireless (Wii) devices.
296+
Say Y here if you want to enable force feedback and range setting
297+
support for following Logitech wheels:
298+
- Logitech Driving Force
299+
- Logitech Driving Force Pro
300+
- Logitech Driving Force GT
301+
- Logitech G25
302+
- Logitech G27
303+
- Logitech MOMO/MOMO 2
304+
- Logitech Formula Force EX
288305

289306
config HID_MAGICMOUSE
290307
tristate "Apple MagicMouse multi-touch support"
@@ -328,6 +345,7 @@ config HID_MULTITOUCH
328345
- Hanvon dual touch panels
329346
- Ilitek dual touch panels
330347
- IrTouch Infrared USB panels
348+
- LG Display panels (Dell ST2220Tc)
331349
- Lumio CrystalTouch panels
332350
- MosArt dual-touch panels
333351
- PenMount dual touch panels
@@ -441,6 +459,13 @@ config HID_PICOLCD_LEDS
441459
---help---
442460
Provide access to PicoLCD's GPO pins via leds class.
443461

462+
config HID_PRIMAX
463+
tristate "Primax non-fully HID-compliant devices"
464+
depends on USB_HID
465+
---help---
466+
Support for Primax devices that are not fully compliant with the
467+
HID standard.
468+
444469
config HID_QUANTA
445470
tristate "Quanta Optical Touch panels"
446471
depends on USB_HID
@@ -539,7 +564,11 @@ config HID_SMARTJOYPLUS
539564
tristate "SmartJoy PLUS PS2/USB adapter support"
540565
depends on USB_HID
541566
---help---
542-
Support for SmartJoy PLUS PS2/USB adapter.
567+
Support for SmartJoy PLUS PS2/USB adapter, Super Dual Box,
568+
Super Joy Box 3 Pro, Super Dual Box Pro, and Super Joy Box 5 Pro.
569+
570+
Note that DDR (Dance Dance Revolution) mode is not supported, nor
571+
is pressure sensitive buttons on the pro models.
543572

544573
config SMARTJOYPLUS_FF
545574
bool "SmartJoy PLUS PS2/USB adapter force feedback support"
@@ -590,6 +619,7 @@ config HID_WIIMOTE
590619
tristate "Nintendo Wii Remote support"
591620
depends on BT_HIDP
592621
depends on LEDS_CLASS
622+
select POWER_SUPPLY
593623
---help---
594624
Support for the Nintendo Wii Remote bluetooth device.
595625

‎drivers/hid/Makefile‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ endif
2121
ifdef CONFIG_LOGIG940_FF
2222
hid-logitech-y += hid-lg3ff.o
2323
endif
24-
ifdef CONFIG_LOGIWII_FF
24+
ifdef CONFIG_LOGIWHEELS_FF
2525
hid-logitech-y += hid-lg4ff.o
2626
endif
2727

@@ -43,6 +43,7 @@ obj-$(CONFIG_HID_KEYTOUCH) += hid-keytouch.o
4343
obj-$(CONFIG_HID_KYE) += hid-kye.o
4444
obj-$(CONFIG_HID_LCPOWER) += hid-lcpower.o
4545
obj-$(CONFIG_HID_LOGITECH) += hid-logitech.o
46+
obj-$(CONFIG_HID_LOGITECH_DJ) += hid-logitech-dj.o
4647
obj-$(CONFIG_HID_MAGICMOUSE) += hid-magicmouse.o
4748
obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o
4849
obj-$(CONFIG_HID_MONTEREY) += hid-monterey.o
@@ -54,6 +55,7 @@ obj-$(CONFIG_HID_QUANTA) += hid-quanta.o
5455
obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
5556
obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o
5657
obj-$(CONFIG_HID_PICOLCD) += hid-picolcd.o
58+
obj-$(CONFIG_HID_PRIMAX) += hid-primax.o
5759
obj-$(CONFIG_HID_ROCCAT) += hid-roccat.o
5860
obj-$(CONFIG_HID_ROCCAT_COMMON) += hid-roccat-common.o
5961
obj-$(CONFIG_HID_ROCCAT_ARVO) += hid-roccat-arvo.o

‎drivers/hid/hid-apple.c‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
183183
if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
184184
hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS)
185185
table = macbookair_fn_keys;
186+
else if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI &&
187+
hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING6_JIS)
188+
table = macbookair_fn_keys;
186189
else if (hid->product < 0x21d || hid->product >= 0x300)
187190
table = powerbook_fn_keys;
188191
else
@@ -493,6 +496,18 @@ static const struct hid_device_id apple_devices[] = {
493496
.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
494497
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS),
495498
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
499+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI),
500+
.driver_data = APPLE_HAS_FN },
501+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_ISO),
502+
.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
503+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_JIS),
504+
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
505+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI),
506+
.driver_data = APPLE_HAS_FN },
507+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO),
508+
.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
509+
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS),
510+
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
496511
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
497512
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
498513
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),

‎drivers/hid/hid-axff.c‎

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Xbox 360 controller.
77
*
88
* 1a34:0802 "ACRUX USB GAMEPAD 8116"
9-
* - tested with a EXEQ EQ-PCU-02090 game controller.
9+
* - tested with an EXEQ EQ-PCU-02090 game controller.
1010
*
1111
* Copyright (c) 2010 Sergei Kolzun <x0r@dv-life.ru>
1212
*/
@@ -45,7 +45,10 @@ static int axff_play(struct input_dev *dev, void *data, struct ff_effect *effect
4545
{
4646
struct hid_device *hid = input_get_drvdata(dev);
4747
struct axff_device *axff = data;
48+
struct hid_report *report = axff->report;
49+
int field_count = 0;
4850
int left, right;
51+
int i, j;
4952

5053
left = effect->u.rumble.strong_magnitude;
5154
right = effect->u.rumble.weak_magnitude;
@@ -55,10 +58,14 @@ static int axff_play(struct input_dev *dev, void *data, struct ff_effect *effect
5558
left = left * 0xff / 0xffff;
5659
right = right * 0xff / 0xffff;
5760

58-
axff->report->field[0]->value[0] = left;
59-
axff->report->field[1]->value[0] = right;
60-
axff->report->field[2]->value[0] = left;
61-
axff->report->field[3]->value[0] = right;
61+
for (i = 0; i < report->maxfield; i++) {
62+
for (j = 0; j < report->field[i]->report_count; j++) {
63+
report->field[i]->value[j] =
64+
field_count % 2 ? right : left;
65+
field_count++;
66+
}
67+
}
68+
6269
dbg_hid("running with 0x%02x 0x%02x", left, right);
6370
usbhid_submit_report(hid, axff->report, USB_DIR_OUT);
6471

@@ -72,6 +79,8 @@ static int axff_init(struct hid_device *hid)
7279
struct hid_input *hidinput = list_first_entry(&hid->inputs, struct hid_input, list);
7380
struct list_head *report_list =&hid->report_enum[HID_OUTPUT_REPORT].report_list;
7481
struct input_dev *dev = hidinput->input;
82+
int field_count = 0;
83+
int i, j;
7584
int error;
7685

7786
if (list_empty(report_list)) {
@@ -80,9 +89,16 @@ static int axff_init(struct hid_device *hid)
8089
}
8190

8291
report = list_first_entry(report_list, struct hid_report, list);
92+
for (i = 0; i < report->maxfield; i++) {
93+
for (j = 0; j < report->field[i]->report_count; j++) {
94+
report->field[i]->value[j] = 0x00;
95+
field_count++;
96+
}
97+
}
8398

84-
if (report->maxfield < 4) {
85-
hid_err(hid, "no fields in the report: %d\n", report->maxfield);
99+
if (field_count < 4) {
100+
hid_err(hid, "not enough fields in the report: %d\n",
101+
field_count);
86102
return -ENODEV;
87103
}
88104

@@ -97,13 +113,9 @@ static int axff_init(struct hid_device *hid)
97113
goto err_free_mem;
98114

99115
axff->report = report;
100-
axff->report->field[0]->value[0] = 0x00;
101-
axff->report->field[1]->value[0] = 0x00;
102-
axff->report->field[2]->value[0] = 0x00;
103-
axff->report->field[3]->value[0] = 0x00;
104116
usbhid_submit_report(hid, axff->report, USB_DIR_OUT);
105117

106-
hid_info(hid, "Force Feedback for ACRUX game controllers by Sergei Kolzun<x0r@dv-life.ru>\n");
118+
hid_info(hid, "Force Feedback for ACRUX game controllers by Sergei Kolzun <x0r@dv-life.ru>\n");
107119

108120
return 0;
109121

0 commit comments

Comments
 (0)