Skip to content

Commit 7af4c72

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID subsystem updates from Jiri Kosina: - The need for HID_QUIRK_NO_INIT_REPORTS per-device quirk has been growing dramatically during past years, so the time has come to switch over the default, and perform the pro-active reading only in cases where it's really needed (multitouch, wacom). The only place where this behavior is (in some form) preserved is hiddev so that we don't introduce userspace-visible change of behavior. From Benjamin Tissoires - HID++ support for power_supply / baterry reporting. From Benjamin Tissoires and Bastien Nocera - Vast improvements / rework of DS3 and DS4 in Sony driver. From Roderick Colenbrander - Improvment (in terms of getting closer to the Microsoft's interpretation of slightly ambiguous specification) of logical range interpretation in case null-state is set in the rdesc. From Valtteri Heikkilä and Tomasz Kramkowski - A lot of newly supported device IDs and small assorted fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (71 commits) HID: usbhid: Add HID_QUIRK_NOGET for Aten CS-1758 KVM switch HID: asus: support backlight on USB keyboards HID: wacom: Move wacom_remote_irq and wacom_remote_status_irq HID: wacom: generic: sync pad events only for actual packets HID: sony: remove redundant check for -ve err HID: sony: Make sure to unregister sensors on failure HID: sony: Make DS4 bt poll interval adjustable HID: sony: Set proper bit flags on DS4 output report HID: sony: DS4 use brighter LED colors HID: sony: Improve navigation controller axis/button mapping HID: sony: Use DS3 MAC address as unique identifier on USB HID: logitech-hidpp: add a sysfs file to tell we support power_supply HID: logitech-hidpp: enable HID++ 1.0 battery reporting HID: logitech-hidpp: add support for battery status for the K750 HID: logitech-hidpp: battery: provide CAPACITY_LEVEL HID: logitech-hidpp: rename battery level into capacity HID: logitech-hidpp: battery: provide ONLINE property HID: logitech-hidpp: notify battery on connect HID: logitech-hidpp: return an error if the queried feature is not present HID: logitech-hidpp: create the battery for all types of HID++ devices ...
2 parents 68fed41 + 4d6ca22 commit 7af4c72

30 files changed

Lines changed: 2490 additions & 1129 deletions

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4127,6 +4127,9 @@
41274127
usbhid.mousepoll=
41284128
[USBHID] The interval which mice are to be polled at.
41294129

4130+
usbhid.jspoll=
4131+
[USBHID] The interval which joysticks are to be polled at.
4132+
41304133
usb-storage.delay_use=
41314134
[UMS] The delay in seconds before a new device is
41324135
scanned for Logical Units (default 1).

Documentation/devicetree/bindings/input/hid-over-i2c.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@ Required properties:
1717
- interrupt-parent: the phandle for the interrupt controller
1818
- interrupts: interrupt line
1919

20+
Additional optional properties:
21+
22+
Some devices may support additional optional properties to help with, e.g.,
23+
power sequencing. The following properties can be supported by one or more
24+
device-specific compatible properties, which should be used in addition to the
25+
"hid-over-i2c" string.
26+
27+
- compatible:
28+
* "wacom,w9013" (Wacom W9013 digitizer). Supports:
29+
- vdd-supply
30+
- post-power-on-delay-ms
31+
32+
- vdd-supply: phandle of the regulator that provides the supply voltage.
33+
- post-power-on-delay-ms: time required by the device after enabling its regulators
34+
before it is ready for communication. Must be used with 'vdd-supply'.
35+
2036
Example:
2137

2238
i2c-hid-dev@2c {

Documentation/input/event-codes.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,10 @@ them as any other INPUT_PROP_BUTTONPAD device.
301301
INPUT_PROP_ACCELEROMETER
302302
-------------------------
303303
Directional axes on this device (absolute and/or relative x, y, z) represent
304-
accelerometer data. All other axes retain their meaning. A device must not mix
304+
accelerometer data. Some devices also report gyroscope data, which devices
305+
can report through the rotational axes (absolute and/or relative rx, ry, rz).
306+
307+
All other axes retain their meaning. A device must not mix
305308
regular directional axes and accelerometer axes on the same event node.
306309

307310
Guidelines:

drivers/hid/Kconfig

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,18 @@ config HID_A4TECH
9898
---help---
9999
Support for A4 tech X5 and WOP-35 / Trust 450L mice.
100100

101+
config HID_ACCUTOUCH
102+
tristate "Accutouch touch device"
103+
depends on USB_HID
104+
---help---
105+
This selects a driver for the Accutouch 2216 touch controller.
106+
107+
The driver works around a problem in the reported device capabilities
108+
which causes userspace to detect the device as a mouse rather than
109+
a touchscreen.
110+
111+
Say Y here if you have a Accutouch 2216 touch controller.
112+
101113
config HID_ACRUX
102114
tristate "ACRUX game controller support"
103115
depends on HID
@@ -136,13 +148,16 @@ config HID_APPLEIR
136148

137149
config HID_ASUS
138150
tristate "Asus"
139-
depends on I2C_HID
151+
depends on LEDS_CLASS
140152
---help---
141-
Support for Asus notebook built-in keyboard and touchpad via i2c.
153+
Support for Asus notebook built-in keyboard and touchpad via i2c, and
154+
the Asus Republic of Gamers laptop keyboard special keys.
142155

143156
Supported devices:
144157
- EeeBook X205TA
145158
- VivoBook E200HA
159+
- GL553V series
160+
- GL753V series
146161

147162
config HID_AUREAL
148163
tristate "Aureal"
@@ -215,7 +230,8 @@ config HID_CMEDIA
215230

216231
config HID_CP2112
217232
tristate "Silicon Labs CP2112 HID USB-to-SMBus Bridge support"
218-
depends on USB_HID && I2C && GPIOLIB && GPIOLIB_IRQCHIP
233+
depends on USB_HID && I2C && GPIOLIB
234+
select GPIOLIB_IRQCHIP
219235
---help---
220236
Support for Silicon Labs CP2112 HID USB to SMBus Master Bridge.
221237
This is a HID device driver which registers as an i2c adapter
@@ -441,6 +457,7 @@ config HID_LOGITECH_DJ
441457
config HID_LOGITECH_HIDPP
442458
tristate "Logitech HID++ devices support"
443459
depends on HID_LOGITECH
460+
select POWER_SUPPLY
444461
---help---
445462
Support for Logitech devices relyingon the HID++ Logitech specification
446463

@@ -581,6 +598,12 @@ config HID_MULTITOUCH
581598
To compile this driver as a module, choose M here: the
582599
module will be called hid-multitouch.
583600

601+
config HID_NTI
602+
tristate "NTI keyboard adapters"
603+
---help---
604+
Support for the "extra" Sun keyboard keys on keyboards attached
605+
through Network Technologies USB-SUN keyboard adapters.
606+
584607
config HID_NTRIG
585608
tristate "N-Trig touch screen"
586609
depends on USB_HID

drivers/hid/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ hid-wiimote-y := hid-wiimote-core.o hid-wiimote-modules.o
2121
hid-wiimote-$(CONFIG_DEBUG_FS) += hid-wiimote-debug.o
2222

2323
obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o
24+
obj-$(CONFIG_HID_ACCUTOUCH) += hid-accutouch.o
2425
obj-$(CONFIG_HID_ALPS) += hid-alps.o
2526
obj-$(CONFIG_HID_ACRUX) += hid-axff.o
2627
obj-$(CONFIG_HID_APPLE) += hid-apple.o
@@ -62,6 +63,7 @@ obj-$(CONFIG_HID_MAYFLASH) += hid-mf.o
6263
obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o
6364
obj-$(CONFIG_HID_MONTEREY) += hid-monterey.o
6465
obj-$(CONFIG_HID_MULTITOUCH) += hid-multitouch.o
66+
obj-$(CONFIG_HID_NTI) += hid-nti.o
6567
obj-$(CONFIG_HID_NTRIG) += hid-ntrig.o
6668
obj-$(CONFIG_HID_ORTEK) += hid-ortek.o
6769
obj-$(CONFIG_HID_PRODIKEYS) += hid-prodikeys.o

drivers/hid/hid-accutouch.c

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* HID driver for Elo Accutouch touchscreens
3+
*
4+
* Copyright (c) 2016, Collabora Ltd.
5+
* Copyright (c) 2016, General Electric Company
6+
*
7+
* based on hid-penmount.c
8+
* Copyright (c) 2014 Christian Gmeiner <christian.gmeiner <at> gmail.com>
9+
*/
10+
11+
/*
12+
* This program is free software; you can redistribute it and/or modify it
13+
* under the terms of the GNU General Public License as published by the Free
14+
* Software Foundation; either version 2 of the License, or (at your option)
15+
* any later version.
16+
*/
17+
18+
#include <linux/hid.h>
19+
#include <linux/module.h>
20+
#include "hid-ids.h"
21+
22+
static int accutouch_input_mapping(struct hid_device *hdev,
23+
struct hid_input *hi,
24+
struct hid_field *field,
25+
struct hid_usage *usage,
26+
unsigned long **bit, int *max)
27+
{
28+
if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {
29+
hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH);
30+
return 1;
31+
}
32+
33+
return 0;
34+
}
35+
36+
static const struct hid_device_id accutouch_devices[] = {
37+
{ HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_ACCUTOUCH_2216) },
38+
{ }
39+
};
40+
MODULE_DEVICE_TABLE(hid, accutouch_devices);
41+
42+
static struct hid_driver accutouch_driver = {
43+
.name = "hid-accutouch",
44+
.id_table = accutouch_devices,
45+
.input_mapping = accutouch_input_mapping,
46+
};
47+
48+
module_hid_driver(accutouch_driver);
49+
50+
MODULE_AUTHOR("Martyn Welch <martyn.welch@collabora.co.uk");
51+
MODULE_DESCRIPTION("Elo Accutouch HID TouchScreen driver");
52+
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)