Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  ...
  • Loading branch information
Linus Torvalds committed Oct 25, 2011
2 parents 7c1953d + b3aec7b commit 31dced4
Show file tree
Hide file tree
Showing 32 changed files with 2,804 additions and 224 deletions.
7 changes: 7 additions & 0 deletions Documentation/ABI/testing/sysfs-driver-hid-logitech-lg4ff
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
What: /sys/module/hid_logitech/drivers/hid:logitech/<dev>/range.
Date: July 2011
KernelVersion: 3.2
Contact: Michal Mal� <madcatxster@gmail.com>
Description: Display minimum, maximum and current range of the steering
wheel. Writing a value within min and max boundaries sets the
range of the wheel.
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7147,6 +7147,12 @@ L: linux-scsi@vger.kernel.org
S: Maintained
F: drivers/scsi/wd7000.c

WIIMOTE HID DRIVER
M: David Herrmann <dh.herrmann@googlemail.com>
L: linux-input@vger.kernel.org
S: Maintained
F: drivers/hid/hid-wiimote*

WINBOND CIR DRIVER
M: David Härdeman <david@hardeman.nu>
S: Maintained
Expand Down
42 changes: 36 additions & 6 deletions drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ config HID_ACRUX
Say Y here if you want to enable support for ACRUX game controllers.

config HID_ACRUX_FF
tristate "ACRUX force feedback support"
bool "ACRUX force feedback support"
depends on HID_ACRUX
select INPUT_FF_MEMLESS
---help---
Expand Down Expand Up @@ -245,6 +245,15 @@ config HID_LOGITECH
---help---
Support for Logitech devices that are not fully compliant with HID standard.

config HID_LOGITECH_DJ
tristate "Logitech Unifying receivers full support"
depends on HID_LOGITECH
default m
---help---
Say Y if you want support for Logitech Unifying receivers and devices.
Unifying receivers are capable of pairing up to 6 Logitech compliant
devices to the same receiver.

config LOGITECH_FF
bool "Logitech force feedback support"
depends on HID_LOGITECH
Expand Down Expand Up @@ -278,13 +287,21 @@ config LOGIG940_FF
Say Y here if you want to enable force feedback support for Logitech
Flight System G940 devices.

config LOGIWII_FF
bool "Logitech Speed Force Wireless force feedback support"
config LOGIWHEELS_FF
bool "Logitech wheels configuration and force feedback support"
depends on HID_LOGITECH
select INPUT_FF_MEMLESS
default LOGITECH_FF
help
Say Y here if you want to enable force feedback support for Logitech
Speed Force Wireless (Wii) devices.
Say Y here if you want to enable force feedback and range setting
support for following Logitech wheels:
- Logitech Driving Force
- Logitech Driving Force Pro
- Logitech Driving Force GT
- Logitech G25
- Logitech G27
- Logitech MOMO/MOMO 2
- Logitech Formula Force EX

config HID_MAGICMOUSE
tristate "Apple MagicMouse multi-touch support"
Expand Down Expand Up @@ -328,6 +345,7 @@ config HID_MULTITOUCH
- Hanvon dual touch panels
- Ilitek dual touch panels
- IrTouch Infrared USB panels
- LG Display panels (Dell ST2220Tc)
- Lumio CrystalTouch panels
- MosArt dual-touch panels
- PenMount dual touch panels
Expand Down Expand Up @@ -441,6 +459,13 @@ config HID_PICOLCD_LEDS
---help---
Provide access to PicoLCD's GPO pins via leds class.

config HID_PRIMAX
tristate "Primax non-fully HID-compliant devices"
depends on USB_HID
---help---
Support for Primax devices that are not fully compliant with the
HID standard.

config HID_QUANTA
tristate "Quanta Optical Touch panels"
depends on USB_HID
Expand Down Expand Up @@ -539,7 +564,11 @@ config HID_SMARTJOYPLUS
tristate "SmartJoy PLUS PS2/USB adapter support"
depends on USB_HID
---help---
Support for SmartJoy PLUS PS2/USB adapter.
Support for SmartJoy PLUS PS2/USB adapter, Super Dual Box,
Super Joy Box 3 Pro, Super Dual Box Pro, and Super Joy Box 5 Pro.

Note that DDR (Dance Dance Revolution) mode is not supported, nor
is pressure sensitive buttons on the pro models.

config SMARTJOYPLUS_FF
bool "SmartJoy PLUS PS2/USB adapter force feedback support"
Expand Down Expand Up @@ -590,6 +619,7 @@ config HID_WIIMOTE
tristate "Nintendo Wii Remote support"
depends on BT_HIDP
depends on LEDS_CLASS
select POWER_SUPPLY
---help---
Support for the Nintendo Wii Remote bluetooth device.

Expand Down
4 changes: 3 additions & 1 deletion drivers/hid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ endif
ifdef CONFIG_LOGIG940_FF
hid-logitech-y += hid-lg3ff.o
endif
ifdef CONFIG_LOGIWII_FF
ifdef CONFIG_LOGIWHEELS_FF
hid-logitech-y += hid-lg4ff.o
endif

Expand All @@ -43,6 +43,7 @@ obj-$(CONFIG_HID_KEYTOUCH) += hid-keytouch.o
obj-$(CONFIG_HID_KYE) += hid-kye.o
obj-$(CONFIG_HID_LCPOWER) += hid-lcpower.o
obj-$(CONFIG_HID_LOGITECH) += hid-logitech.o
obj-$(CONFIG_HID_LOGITECH_DJ) += hid-logitech-dj.o
obj-$(CONFIG_HID_MAGICMOUSE) += hid-magicmouse.o
obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o
obj-$(CONFIG_HID_MONTEREY) += hid-monterey.o
Expand All @@ -54,6 +55,7 @@ obj-$(CONFIG_HID_QUANTA) += hid-quanta.o
obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o
obj-$(CONFIG_HID_PICOLCD) += hid-picolcd.o
obj-$(CONFIG_HID_PRIMAX) += hid-primax.o
obj-$(CONFIG_HID_ROCCAT) += hid-roccat.o
obj-$(CONFIG_HID_ROCCAT_COMMON) += hid-roccat-common.o
obj-$(CONFIG_HID_ROCCAT_ARVO) += hid-roccat-arvo.o
Expand Down
15 changes: 15 additions & 0 deletions drivers/hid/hid-apple.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS)
table = macbookair_fn_keys;
else if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI &&
hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING6_JIS)
table = macbookair_fn_keys;
else if (hid->product < 0x21d || hid->product >= 0x300)
table = powerbook_fn_keys;
else
Expand Down Expand Up @@ -493,6 +496,18 @@ static const struct hid_device_id apple_devices[] = {
.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS),
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI),
.driver_data = APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_ISO),
.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_JIS),
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI),
.driver_data = APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO),
.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS),
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
Expand Down
36 changes: 24 additions & 12 deletions drivers/hid/hid-axff.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Xbox 360 controller.
*
* 1a34:0802 "ACRUX USB GAMEPAD 8116"
* - tested with a EXEQ EQ-PCU-02090 game controller.
* - tested with an EXEQ EQ-PCU-02090 game controller.
*
* Copyright (c) 2010 Sergei Kolzun <x0r@dv-life.ru>
*/
Expand Down Expand Up @@ -45,7 +45,10 @@ static int axff_play(struct input_dev *dev, void *data, struct ff_effect *effect
{
struct hid_device *hid = input_get_drvdata(dev);
struct axff_device *axff = data;
struct hid_report *report = axff->report;
int field_count = 0;
int left, right;
int i, j;

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

axff->report->field[0]->value[0] = left;
axff->report->field[1]->value[0] = right;
axff->report->field[2]->value[0] = left;
axff->report->field[3]->value[0] = right;
for (i = 0; i < report->maxfield; i++) {
for (j = 0; j < report->field[i]->report_count; j++) {
report->field[i]->value[j] =
field_count % 2 ? right : left;
field_count++;
}
}

dbg_hid("running with 0x%02x 0x%02x", left, right);
usbhid_submit_report(hid, axff->report, USB_DIR_OUT);

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

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

report = list_first_entry(report_list, struct hid_report, list);
for (i = 0; i < report->maxfield; i++) {
for (j = 0; j < report->field[i]->report_count; j++) {
report->field[i]->value[j] = 0x00;
field_count++;
}
}

if (report->maxfield < 4) {
hid_err(hid, "no fields in the report: %d\n", report->maxfield);
if (field_count < 4) {
hid_err(hid, "not enough fields in the report: %d\n",
field_count);
return -ENODEV;
}

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

axff->report = report;
axff->report->field[0]->value[0] = 0x00;
axff->report->field[1]->value[0] = 0x00;
axff->report->field[2]->value[0] = 0x00;
axff->report->field[3]->value[0] = 0x00;
usbhid_submit_report(hid, axff->report, USB_DIR_OUT);

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

return 0;

Expand Down
Loading

0 comments on commit 31dced4

Please sign in to comment.