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

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
  ...
  • Loading branch information
torvalds committed Jul 4, 2013
2 parents 697a067 + 21796b3 commit 3366dd9
Show file tree
Hide file tree
Showing 25 changed files with 4,640 additions and 1,728 deletions.
39 changes: 38 additions & 1 deletion Documentation/ABI/testing/sysfs-driver-hid-wiimote
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,48 @@ Description: Make it possible to set/get current led state. Reading from it
What: /sys/bus/hid/drivers/wiimote/<dev>/extension
Date: August 2011
KernelVersion: 3.2
Contact: David Herrmann <dh.herrmann@googlemail.com>
Contact: David Herrmann <dh.herrmann@gmail.com>
Description: This file contains the currently connected and initialized
extensions. It can be one of: none, motionp, nunchuck, classic,
motionp+nunchuck, motionp+classic
motionp is the official Nintendo Motion+ extension, nunchuck is
the official Nintendo Nunchuck extension and classic is the
Nintendo Classic Controller extension. The motionp extension can
be combined with the other two.
Starting with kernel-version 3.11 Motion Plus hotplugging is
supported and if detected, it's no longer reported as static
extension. You will get uevent notifications for the motion-plus
device then.

What: /sys/bus/hid/drivers/wiimote/<dev>/devtype
Date: May 2013
KernelVersion: 3.11
Contact: David Herrmann <[email protected]>
Description: While a device is initialized by the wiimote driver, we perform
a device detection and signal a "change" uevent after it is
done. This file shows the detected device type. "pending" means
that the detection is still ongoing, "unknown" means, that the
device couldn't be detected or loaded. "generic" means, that the
device couldn't be detected but supports basic Wii Remote
features and can be used.
Other strings for each device-type are available and may be
added if new device-specific detections are added.
Currently supported are:
gen10: First Wii Remote generation
gen20: Second Wii Remote Plus generation (builtin MP)
balanceboard: Wii Balance Board

What: /sys/bus/hid/drivers/wiimote/<dev>/bboard_calib
Date: May 2013
KernelVersion: 3.11
Contact: David Herrmann <[email protected]>
Description: This attribute is only provided if the device was detected as a
balance board. It provides a single line with 3 calibration
values for all 4 sensors. The values are separated by colons and
are each 2 bytes long (encoded as 4 digit hexadecimal value).
First, 0kg values for all 4 sensors are written, followed by the
17kg values for all 4 sensors and last the 34kg values for all 4
sensors.
Calibration data is already applied by the kernel to all input
values but may be used by user-space to perform other
transformations.
63 changes: 41 additions & 22 deletions drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@ config HID_ELECOM
---help---
Support for the ELECOM BM084 (bluetooth mouse).

config HID_ELO
tristate "ELO USB 4000/4500 touchscreen"
depends on USB_HID
---help---
Support for the ELO USB 4000/4500 touchscreens. Note that this is for
different devices than those handled by CONFIG_TOUCHSCREEN_USB_ELO.

config HID_EZKEY
tristate "Ezkey BTC 8193 keyboard" if EXPERT
depends on HID
Expand All @@ -231,6 +238,9 @@ config HID_HOLTEK
Support for Holtek based devices:
- Holtek On Line Grip based game controller
- Trust GXT 18 Gaming Keyboard
- Sharkoon Drakonia / Perixx MX-2000 gaming mice
- Tracer Sniper TRM-503 / NOVA Gaming Slider X200 /
Zalman ZM-GM1

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

config HID_HUION
tristate "Huion tablets"
depends on USB_HID
---help---
Support for Huion 580 tablet.

config HID_KEYTOUCH
tristate "Keytouch HID devices"
depends on HID
Expand Down Expand Up @@ -561,15 +577,6 @@ config HID_PRIMAX
Support for Primax devices that are not fully compliant with the
HID standard.

config HID_PS3REMOTE
tristate "Sony PS3 BD Remote Control"
depends on HID
---help---
Support for the Sony PS3 Blue-ray Disk Remote Control and Logitech
Harmony Adapter for PS3, which connect over Bluetooth.

Support for the 6-axis controllers is provided by HID_SONY.

config HID_ROCCAT
tristate "Roccat device support"
depends on USB_HID
Expand All @@ -594,12 +601,17 @@ config HID_SAMSUNG
Support for Samsung InfraRed remote control or keyboards.

config HID_SONY
tristate "Sony PS3 controller"
tristate "Sony PS2/3 accessories"
depends on USB_HID
depends on NEW_LEDS
depends on LEDS_CLASS
---help---
Support for Sony PS3 6-axis controllers.
Support for

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

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

config HID_WIIMOTE
tristate "Nintendo Wii Remote support"
tristate "Nintendo Wii / Wii U peripherals"
depends on HID
depends on LEDS_CLASS
select POWER_SUPPLY
select INPUT_FF_MEMLESS
---help---
Support for the Nintendo Wii Remote bluetooth device.
Support for Nintendo Wii and Wii U Bluetooth peripherals. Supported
devices are the Wii Remote and its extension devices, but also devices
based on the Wii Remote like the Wii U Pro Controller or the
Wii Balance Board.

config HID_WIIMOTE_EXT
bool "Nintendo Wii Remote Extension support"
depends on HID_WIIMOTE
default HID_WIIMOTE
---help---
Support for extension controllers of the Nintendo Wii Remote. Say yes
here if you want to use the Nintendo Motion+, Nunchuck or Classic
extension controllers with your Wii Remote.
Support for all official Nintendo extensions is available, however, 3rd
party extensions might not be supported. Please report these devices to:
http://github.com/dvdhrm/xwiimote/issues

Other Nintendo Wii U peripherals that are IEEE 802.11 based (including
the Wii U Gamepad) might be supported in the future. But currently
support is limited to Bluetooth based devices.

If unsure, say N.

To compile this driver as a module, choose M here: the
module will be called hid-wiimote.

config HID_ZEROPLUS
tristate "Zeroplus based game controller support"
Expand Down
9 changes: 4 additions & 5 deletions drivers/hid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ ifdef CONFIG_LOGIWHEELS_FF
hid-logitech-y += hid-lg4ff.o
endif

hid-wiimote-y := hid-wiimote-core.o
ifdef CONFIG_HID_WIIMOTE_EXT
hid-wiimote-y += hid-wiimote-ext.o
endif
hid-wiimote-y := hid-wiimote-core.o hid-wiimote-modules.o
ifdef CONFIG_DEBUG_FS
hid-wiimote-y += hid-wiimote-debug.o
endif
Expand All @@ -48,10 +45,13 @@ obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o
obj-$(CONFIG_HID_DRAGONRISE) += hid-dr.o
obj-$(CONFIG_HID_EMS_FF) += hid-emsff.o
obj-$(CONFIG_HID_ELECOM) += hid-elecom.o
obj-$(CONFIG_HID_ELO) += hid-elo.o
obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o
obj-$(CONFIG_HID_GYRATION) += hid-gyration.o
obj-$(CONFIG_HID_HOLTEK) += hid-holtek-kbd.o
obj-$(CONFIG_HID_HOLTEK) += hid-holtek-mouse.o
obj-$(CONFIG_HID_HOLTEK) += hid-holtekff.o
obj-$(CONFIG_HID_HUION) += hid-huion.o
obj-$(CONFIG_HID_HYPERV_MOUSE) += hid-hyperv.o
obj-$(CONFIG_HID_ICADE) += hid-icade.o
obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o
Expand Down Expand Up @@ -92,7 +92,6 @@ hid-picolcd-y += hid-picolcd_debugfs.o
endif

obj-$(CONFIG_HID_PRIMAX) += hid-primax.o
obj-$(CONFIG_HID_PS3REMOTE) += hid-ps3remote.o
obj-$(CONFIG_HID_ROCCAT) += hid-roccat.o hid-roccat-common.o \
hid-roccat-arvo.o hid-roccat-isku.o hid-roccat-kone.o \
hid-roccat-koneplus.o hid-roccat-konepure.o hid-roccat-kovaplus.o \
Expand Down
12 changes: 11 additions & 1 deletion drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i

if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
ret = hdrv->raw_event(hid, report, data, size);
if (ret != 0) {
if (ret < 0) {
ret = ret < 0 ? ret : 0;
goto unlock;
}
Expand Down Expand Up @@ -1573,6 +1573,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) },
{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0009) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0030) },
{ HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) },
{ HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
Expand All @@ -1584,10 +1586,14 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) },
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK, USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP) },
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD) },
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A) },
{ HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) },
{ HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_580) },
{ HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) },
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_I405X) },
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X) },
Expand Down Expand Up @@ -1680,6 +1686,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER) },
Expand Down Expand Up @@ -2042,6 +2050,8 @@ static const struct hid_device_id hid_ignore_list[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006) },
{ HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1007) },
{ HID_USB_DEVICE(USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA) },
{ HID_USB_DEVICE(USB_VENDOR_ID_JABRA, USB_DEVICE_ID_JABRA_SPEAK_410) },
{ HID_USB_DEVICE(USB_VENDOR_ID_JABRA, USB_DEVICE_ID_JABRA_SPEAK_510) },
{ HID_USB_DEVICE(USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) },
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) },
Expand Down
Loading

0 comments on commit 3366dd9

Please sign in to comment.