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 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
  ...
  • Loading branch information
torvalds committed May 3, 2017
2 parents 68fed41 + 4d6ca22 commit 7af4c72
Show file tree
Hide file tree
Showing 30 changed files with 2,490 additions and 1,129 deletions.
3 changes: 3 additions & 0 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4127,6 +4127,9 @@
usbhid.mousepoll=
[USBHID] The interval which mice are to be polled at.

usbhid.jspoll=
[USBHID] The interval which joysticks are to be polled at.

usb-storage.delay_use=
[UMS] The delay in seconds before a new device is
scanned for Logical Units (default 1).
Expand Down
16 changes: 16 additions & 0 deletions Documentation/devicetree/bindings/input/hid-over-i2c.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ Required properties:
- interrupt-parent: the phandle for the interrupt controller
- interrupts: interrupt line

Additional optional properties:

Some devices may support additional optional properties to help with, e.g.,
power sequencing. The following properties can be supported by one or more
device-specific compatible properties, which should be used in addition to the
"hid-over-i2c" string.

- compatible:
* "wacom,w9013" (Wacom W9013 digitizer). Supports:
- vdd-supply
- post-power-on-delay-ms

- vdd-supply: phandle of the regulator that provides the supply voltage.
- post-power-on-delay-ms: time required by the device after enabling its regulators
before it is ready for communication. Must be used with 'vdd-supply'.

Example:

i2c-hid-dev@2c {
Expand Down
5 changes: 4 additions & 1 deletion Documentation/input/event-codes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,10 @@ them as any other INPUT_PROP_BUTTONPAD device.
INPUT_PROP_ACCELEROMETER
-------------------------
Directional axes on this device (absolute and/or relative x, y, z) represent
accelerometer data. All other axes retain their meaning. A device must not mix
accelerometer data. Some devices also report gyroscope data, which devices
can report through the rotational axes (absolute and/or relative rx, ry, rz).

All other axes retain their meaning. A device must not mix
regular directional axes and accelerometer axes on the same event node.

Guidelines:
Expand Down
29 changes: 26 additions & 3 deletions drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ config HID_A4TECH
---help---
Support for A4 tech X5 and WOP-35 / Trust 450L mice.

config HID_ACCUTOUCH
tristate "Accutouch touch device"
depends on USB_HID
---help---
This selects a driver for the Accutouch 2216 touch controller.

The driver works around a problem in the reported device capabilities
which causes userspace to detect the device as a mouse rather than
a touchscreen.

Say Y here if you have a Accutouch 2216 touch controller.

config HID_ACRUX
tristate "ACRUX game controller support"
depends on HID
Expand Down Expand Up @@ -136,13 +148,16 @@ config HID_APPLEIR

config HID_ASUS
tristate "Asus"
depends on I2C_HID
depends on LEDS_CLASS
---help---
Support for Asus notebook built-in keyboard and touchpad via i2c.
Support for Asus notebook built-in keyboard and touchpad via i2c, and
the Asus Republic of Gamers laptop keyboard special keys.

Supported devices:
- EeeBook X205TA
- VivoBook E200HA
- GL553V series
- GL753V series

config HID_AUREAL
tristate "Aureal"
Expand Down Expand Up @@ -215,7 +230,8 @@ config HID_CMEDIA

config HID_CP2112
tristate "Silicon Labs CP2112 HID USB-to-SMBus Bridge support"
depends on USB_HID && I2C && GPIOLIB && GPIOLIB_IRQCHIP
depends on USB_HID && I2C && GPIOLIB
select GPIOLIB_IRQCHIP
---help---
Support for Silicon Labs CP2112 HID USB to SMBus Master Bridge.
This is a HID device driver which registers as an i2c adapter
Expand Down Expand Up @@ -441,6 +457,7 @@ config HID_LOGITECH_DJ
config HID_LOGITECH_HIDPP
tristate "Logitech HID++ devices support"
depends on HID_LOGITECH
select POWER_SUPPLY
---help---
Support for Logitech devices relyingon the HID++ Logitech specification

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

config HID_NTI
tristate "NTI keyboard adapters"
---help---
Support for the "extra" Sun keyboard keys on keyboards attached
through Network Technologies USB-SUN keyboard adapters.

config HID_NTRIG
tristate "N-Trig touch screen"
depends on USB_HID
Expand Down
2 changes: 2 additions & 0 deletions drivers/hid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ hid-wiimote-y := hid-wiimote-core.o hid-wiimote-modules.o
hid-wiimote-$(CONFIG_DEBUG_FS) += hid-wiimote-debug.o

obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o
obj-$(CONFIG_HID_ACCUTOUCH) += hid-accutouch.o
obj-$(CONFIG_HID_ALPS) += hid-alps.o
obj-$(CONFIG_HID_ACRUX) += hid-axff.o
obj-$(CONFIG_HID_APPLE) += hid-apple.o
Expand Down Expand Up @@ -62,6 +63,7 @@ obj-$(CONFIG_HID_MAYFLASH) += hid-mf.o
obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o
obj-$(CONFIG_HID_MONTEREY) += hid-monterey.o
obj-$(CONFIG_HID_MULTITOUCH) += hid-multitouch.o
obj-$(CONFIG_HID_NTI) += hid-nti.o
obj-$(CONFIG_HID_NTRIG) += hid-ntrig.o
obj-$(CONFIG_HID_ORTEK) += hid-ortek.o
obj-$(CONFIG_HID_PRODIKEYS) += hid-prodikeys.o
Expand Down
52 changes: 52 additions & 0 deletions drivers/hid/hid-accutouch.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* HID driver for Elo Accutouch touchscreens
*
* Copyright (c) 2016, Collabora Ltd.
* Copyright (c) 2016, General Electric Company
*
* based on hid-penmount.c
* Copyright (c) 2014 Christian Gmeiner <christian.gmeiner <at> gmail.com>
*/

/*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*/

#include <linux/hid.h>
#include <linux/module.h>
#include "hid-ids.h"

static int accutouch_input_mapping(struct hid_device *hdev,
struct hid_input *hi,
struct hid_field *field,
struct hid_usage *usage,
unsigned long **bit, int *max)
{
if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) {
hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH);
return 1;
}

return 0;
}

static const struct hid_device_id accutouch_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_ACCUTOUCH_2216) },
{ }
};
MODULE_DEVICE_TABLE(hid, accutouch_devices);

static struct hid_driver accutouch_driver = {
.name = "hid-accutouch",
.id_table = accutouch_devices,
.input_mapping = accutouch_input_mapping,
};

module_hid_driver(accutouch_driver);

MODULE_AUTHOR("Martyn Welch <[email protected]");
MODULE_DESCRIPTION("Elo Accutouch HID TouchScreen driver");
MODULE_LICENSE("GPL");
Loading

0 comments on commit 7af4c72

Please sign in to comment.