Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 3366dd9

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: - HID battery handling cleanup by David Herrmann - ELO 4000/4500 driver, which has been finally ported to be proper HID driver by Jiri Slaby - ps3remote driver functionality is now provided by generic sony driver, by Jiri Kosina - PS2/3 Buzz controllers support, by Colin Leitner - rework of wiimote driver including full extensions hotpluggin support, sub-device modularization and speaker support by David Herrmann * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (55 commits) HID: wacom: Intuos4 battery charging changes HID: i2c-hid: support sending HID output reports using the output register HID: kye: Add report fixup for Genius Gila Gaming mouse HID: wiimote: support Nintendo Wii U Pro Controller Input: make gamepad API keycodes more clear input: document gamepad API and add extra keycodes HID: explain out-of-range check better HID: fix false positive out of range values HID: wiimote: fix coccinelle warnings HID: roccat: check cdev_add return value HID: fold ps3remote driver into generic Sony driver HID: hyperv: convert alloc+memcpy to memdup HID: core: fix reporting of raw events HID: wiimote: discard invalid EXT data reports HID: wiimote: fix classic controller parsing HID: wiimote: init EXT/MP during device detection HID: wiimote: fix DRM debug-attr to correctly parse input HID: wiimote: add MP quirks HID: wiimote: remove old static extension support HID: wiimote: add "bboard_calib" attribute ...
2 parents 697a067 + 21796b3 commit 3366dd9

25 files changed

+4640
-1728
lines changed

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

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,48 @@ Description: Make it possible to set/get current led state. Reading from it
1212
What: /sys/bus/hid/drivers/wiimote/<dev>/extension
1313
Date: August 2011
1414
KernelVersion: 3.2
15-
Contact: David Herrmann <dh.herrmann@googlemail.com>
15+
Contact: David Herrmann <dh.herrmann@gmail.com>
1616
Description: This file contains the currently connected and initialized
1717
extensions. It can be one of: none, motionp, nunchuck, classic,
1818
motionp+nunchuck, motionp+classic
1919
motionp is the official Nintendo Motion+ extension, nunchuck is
2020
the official Nintendo Nunchuck extension and classic is the
2121
Nintendo Classic Controller extension. The motionp extension can
2222
be combined with the other two.
23+
Starting with kernel-version 3.11 Motion Plus hotplugging is
24+
supported and if detected, it's no longer reported as static
25+
extension. You will get uevent notifications for the motion-plus
26+
device then.
27+
28+
What: /sys/bus/hid/drivers/wiimote/<dev>/devtype
29+
Date: May 2013
30+
KernelVersion: 3.11
31+
Contact: David Herrmann <[email protected]>
32+
Description: While a device is initialized by the wiimote driver, we perform
33+
a device detection and signal a "change" uevent after it is
34+
done. This file shows the detected device type. "pending" means
35+
that the detection is still ongoing, "unknown" means, that the
36+
device couldn't be detected or loaded. "generic" means, that the
37+
device couldn't be detected but supports basic Wii Remote
38+
features and can be used.
39+
Other strings for each device-type are available and may be
40+
added if new device-specific detections are added.
41+
Currently supported are:
42+
gen10: First Wii Remote generation
43+
gen20: Second Wii Remote Plus generation (builtin MP)
44+
balanceboard: Wii Balance Board
45+
46+
What: /sys/bus/hid/drivers/wiimote/<dev>/bboard_calib
47+
Date: May 2013
48+
KernelVersion: 3.11
49+
Contact: David Herrmann <[email protected]>
50+
Description: This attribute is only provided if the device was detected as a
51+
balance board. It provides a single line with 3 calibration
52+
values for all 4 sensors. The values are separated by colons and
53+
are each 2 bytes long (encoded as 4 digit hexadecimal value).
54+
First, 0kg values for all 4 sensors are written, followed by the
55+
17kg values for all 4 sensors and last the 34kg values for all 4
56+
sensors.
57+
Calibration data is already applied by the kernel to all input
58+
values but may be used by user-space to perform other
59+
transformations.

drivers/hid/Kconfig

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,13 @@ config HID_ELECOM
217217
---help---
218218
Support for the ELECOM BM084 (bluetooth mouse).
219219

220+
config HID_ELO
221+
tristate "ELO USB 4000/4500 touchscreen"
222+
depends on USB_HID
223+
---help---
224+
Support for the ELO USB 4000/4500 touchscreens. Note that this is for
225+
different devices than those handled by CONFIG_TOUCHSCREEN_USB_ELO.
226+
220227
config HID_EZKEY
221228
tristate "Ezkey BTC 8193 keyboard" if EXPERT
222229
depends on HID
@@ -231,6 +238,9 @@ config HID_HOLTEK
231238
Support for Holtek based devices:
232239
- Holtek On Line Grip based game controller
233240
- Trust GXT 18 Gaming Keyboard
241+
- Sharkoon Drakonia / Perixx MX-2000 gaming mice
242+
- Tracer Sniper TRM-503 / NOVA Gaming Slider X200 /
243+
Zalman ZM-GM1
234244

235245
config HOLTEK_FF
236246
bool "Holtek On Line Grip force feedback support"
@@ -240,6 +250,12 @@ config HOLTEK_FF
240250
Say Y here if you have a Holtek On Line Grip based game controller
241251
and want to have force feedback support for it.
242252

253+
config HID_HUION
254+
tristate "Huion tablets"
255+
depends on USB_HID
256+
---help---
257+
Support for Huion 580 tablet.
258+
243259
config HID_KEYTOUCH
244260
tristate "Keytouch HID devices"
245261
depends on HID
@@ -561,15 +577,6 @@ config HID_PRIMAX
561577
Support for Primax devices that are not fully compliant with the
562578
HID standard.
563579

564-
config HID_PS3REMOTE
565-
tristate "Sony PS3 BD Remote Control"
566-
depends on HID
567-
---help---
568-
Support for the Sony PS3 Blue-ray Disk Remote Control and Logitech
569-
Harmony Adapter for PS3, which connect over Bluetooth.
570-
571-
Support for the 6-axis controllers is provided by HID_SONY.
572-
573580
config HID_ROCCAT
574581
tristate "Roccat device support"
575582
depends on USB_HID
@@ -594,12 +601,17 @@ config HID_SAMSUNG
594601
Support for Samsung InfraRed remote control or keyboards.
595602

596603
config HID_SONY
597-
tristate "Sony PS3 controller"
604+
tristate "Sony PS2/3 accessories"
598605
depends on USB_HID
606+
depends on NEW_LEDS
607+
depends on LEDS_CLASS
599608
---help---
600-
Support for Sony PS3 6-axis controllers.
609+
Support for
601610

602-
Support for the Sony PS3 BD Remote is provided by HID_PS3REMOTE.
611+
* Sony PS3 6-axis controllers
612+
* Buzz controllers
613+
* Sony PS3 Blue-ray Disk Remote Control (Bluetooth)
614+
* Logitech Harmony adapter for Sony Playstation 3 (Bluetooth)
603615

604616
config HID_SPEEDLINK
605617
tristate "Speedlink VAD Cezanne mouse support"
@@ -707,22 +719,29 @@ config HID_WACOM
707719
Support for Wacom Graphire Bluetooth and Intuos4 WL tablets.
708720

709721
config HID_WIIMOTE
710-
tristate "Nintendo Wii Remote support"
722+
tristate "Nintendo Wii / Wii U peripherals"
711723
depends on HID
712724
depends on LEDS_CLASS
713725
select POWER_SUPPLY
714726
select INPUT_FF_MEMLESS
715727
---help---
716-
Support for the Nintendo Wii Remote bluetooth device.
728+
Support for Nintendo Wii and Wii U Bluetooth peripherals. Supported
729+
devices are the Wii Remote and its extension devices, but also devices
730+
based on the Wii Remote like the Wii U Pro Controller or the
731+
Wii Balance Board.
717732

718-
config HID_WIIMOTE_EXT
719-
bool "Nintendo Wii Remote Extension support"
720-
depends on HID_WIIMOTE
721-
default HID_WIIMOTE
722-
---help---
723-
Support for extension controllers of the Nintendo Wii Remote. Say yes
724-
here if you want to use the Nintendo Motion+, Nunchuck or Classic
725-
extension controllers with your Wii Remote.
733+
Support for all official Nintendo extensions is available, however, 3rd
734+
party extensions might not be supported. Please report these devices to:
735+
http://github.com/dvdhrm/xwiimote/issues
736+
737+
Other Nintendo Wii U peripherals that are IEEE 802.11 based (including
738+
the Wii U Gamepad) might be supported in the future. But currently
739+
support is limited to Bluetooth based devices.
740+
741+
If unsure, say N.
742+
743+
To compile this driver as a module, choose M here: the
744+
module will be called hid-wiimote.
726745

727746
config HID_ZEROPLUS
728747
tristate "Zeroplus based game controller support"

drivers/hid/Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ ifdef CONFIG_LOGIWHEELS_FF
2828
hid-logitech-y += hid-lg4ff.o
2929
endif
3030

31-
hid-wiimote-y := hid-wiimote-core.o
32-
ifdef CONFIG_HID_WIIMOTE_EXT
33-
hid-wiimote-y += hid-wiimote-ext.o
34-
endif
31+
hid-wiimote-y := hid-wiimote-core.o hid-wiimote-modules.o
3532
ifdef CONFIG_DEBUG_FS
3633
hid-wiimote-y += hid-wiimote-debug.o
3734
endif
@@ -48,10 +45,13 @@ obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o
4845
obj-$(CONFIG_HID_DRAGONRISE) += hid-dr.o
4946
obj-$(CONFIG_HID_EMS_FF) += hid-emsff.o
5047
obj-$(CONFIG_HID_ELECOM) += hid-elecom.o
48+
obj-$(CONFIG_HID_ELO) += hid-elo.o
5149
obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o
5250
obj-$(CONFIG_HID_GYRATION) += hid-gyration.o
5351
obj-$(CONFIG_HID_HOLTEK) += hid-holtek-kbd.o
52+
obj-$(CONFIG_HID_HOLTEK) += hid-holtek-mouse.o
5453
obj-$(CONFIG_HID_HOLTEK) += hid-holtekff.o
54+
obj-$(CONFIG_HID_HUION) += hid-huion.o
5555
obj-$(CONFIG_HID_HYPERV_MOUSE) += hid-hyperv.o
5656
obj-$(CONFIG_HID_ICADE) += hid-icade.o
5757
obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o
@@ -92,7 +92,6 @@ hid-picolcd-y += hid-picolcd_debugfs.o
9292
endif
9393

9494
obj-$(CONFIG_HID_PRIMAX) += hid-primax.o
95-
obj-$(CONFIG_HID_PS3REMOTE) += hid-ps3remote.o
9695
obj-$(CONFIG_HID_ROCCAT) += hid-roccat.o hid-roccat-common.o \
9796
hid-roccat-arvo.o hid-roccat-isku.o hid-roccat-kone.o \
9897
hid-roccat-koneplus.o hid-roccat-konepure.o hid-roccat-kovaplus.o \

drivers/hid/hid-core.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
12931293

12941294
if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
12951295
ret = hdrv->raw_event(hid, report, data, size);
1296-
if (ret != 0) {
1296+
if (ret < 0) {
12971297
ret = ret < 0 ? ret : 0;
12981298
goto unlock;
12991299
}
@@ -1573,6 +1573,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
15731573
{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) },
15741574
{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) },
15751575
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
1576+
{ HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0009) },
1577+
{ HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0030) },
15761578
{ HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) },
15771579
{ HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
15781580
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
@@ -1584,10 +1586,14 @@ static const struct hid_device_id hid_have_special_driver[] = {
15841586
{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) },
15851587
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK, USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP) },
15861588
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD) },
1589+
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A) },
1590+
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) },
1591+
{ HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_580) },
15871592
{ HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) },
15881593
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) },
15891594
{ HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
15901595
{ HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) },
1596+
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) },
15911597
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
15921598
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_I405X) },
15931599
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X) },
@@ -1680,6 +1686,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
16801686
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
16811687
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
16821688
{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
1689+
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER) },
1690+
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER) },
16831691
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE) },
16841692
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
16851693
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER) },
@@ -2042,6 +2050,8 @@ static const struct hid_device_id hid_ignore_list[] = {
20422050
{ HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006) },
20432051
{ HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1007) },
20442052
{ HID_USB_DEVICE(USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA) },
2053+
{ HID_USB_DEVICE(USB_VENDOR_ID_JABRA, USB_DEVICE_ID_JABRA_SPEAK_410) },
2054+
{ HID_USB_DEVICE(USB_VENDOR_ID_JABRA, USB_DEVICE_ID_JABRA_SPEAK_510) },
20452055
{ HID_USB_DEVICE(USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO) },
20462056
{ HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) },
20472057
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) },

0 commit comments

Comments
 (0)