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:

 - remove hid_have_special_driver[] entry hard requirement for any newly
   supported VID/PID by a specific non-core hid driver, and general
   related cleanup of HID matching core, from Benjamin Tissoires

 - support for new Wacom devices and a few small fixups for already
   supported ones in Wacom driver, from Aaron Armstrong Skomra and Jason
   Gerecke

 - sysfs interface fix for roccat driver from Dan Carpenter

 - support for new Asus HW (T100TAF, T100HA, T200TA) from Hans de Goede

 - improved support for Jabra devices, from Niels Skou Olsen

 - other assorted small fixes and new device IDs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (30 commits)
  HID: quirks: Fix keyboard + touchpad on Toshiba Click Mini not working
  HID: roccat: prevent an out of bounds read in kovaplus_profile_activated()
  HID: asus: Fix special function keys on T200TA
  HID: asus: Add touchpad max x/y and resolution info for the T200TA
  HID: wacom: Add support for One by Wacom (CTL-472 / CTL-672)
  HID: wacom: Fix reporting of touch toggle (WACOM_HID_WD_MUTE_DEVICE) events
  HID: intel-ish-hid: Enable Cannon Lake and Coffee Lake laptop/desktop
  HID: elecom: rewrite report fixup for EX-G and future mice
  HID: sony: Report DS4 version info through sysfs
  HID: sony: Print reversed MAC address via %pMR
  HID: wacom: EKR: ensure devres groups at higher indexes are released
  HID: rmi: Support the Fujitsu R726 Pad dock using hid-rmi
  HID: add quirk for another PIXART OEM mouse used by HP
  HID: quirks: make array hid_quirks static
  HID: hid-multitouch: support fine-grain orientation reporting
  HID: asus: Add product-id for the T100TAF and T100HA keyboard docks
  HID: elo: clear BTN_LEFT mapping
  HID: multitouch: Combine all left-button events in a frame
  HID: multitouch: Only look at non touch fields in first packet of a frame
  HID: multitouch: Properly deal with Win8 PTP reports with 0 touches
  ...
  • Loading branch information
Linus Torvalds committed Jan 31, 2018
2 parents 4c6790c + c86aa01 commit 183b636
Show file tree
Hide file tree
Showing 27 changed files with 1,995 additions and 1,396 deletions.
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/input/hid-over-i2c.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ device-specific compatible properties, which should be used in addition to the

- 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'.
or powering it on, before it is ready for communication.

Example:

Expand Down
9 changes: 5 additions & 4 deletions Documentation/input/multi-touch-protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,11 @@ ABS_MT_ORIENTATION
The orientation of the touching ellipse. The value should describe a signed
quarter of a revolution clockwise around the touch center. The signed value
range is arbitrary, but zero should be returned for an ellipse aligned with
the Y axis of the surface, a negative value when the ellipse is turned to
the left, and a positive value when the ellipse is turned to the
right. When completely aligned with the X axis, the range max should be
returned.
the Y axis (north) of the surface, a negative value when the ellipse is
turned to the left, and a positive value when the ellipse is turned to the
right. When aligned with the X axis in the positive direction, the range
max should be returned; when aligned with the X axis in the negative
direction, the range -max should be returned.

Touch ellipsis are symmetrical by default. For devices capable of true 360
degree orientation, the reported orientation must exceed the range max to
Expand Down
12 changes: 12 additions & 0 deletions drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ config HID_ELECOM
---help---
Support for ELECOM devices:
- BM084 Bluetooth Mouse
- EX-G Trackball (Wired and wireless)
- DEFT Trackball (Wired and wireless)
- HUGE Trackball (Wired and wireless)

Expand Down Expand Up @@ -396,6 +397,17 @@ config HID_ITE
---help---
Support for ITE devices not fully compliant with HID standard.

config HID_JABRA
tristate "Jabra USB HID Driver"
depends on HID
---help---
Support for Jabra USB HID devices.

Prevents mapping of vendor defined HID usages to input events. Without
this driver HID reports from Jabra devices may incorrectly be seen as
mouse button events.
Say M here if you may ever plug in a Jabra USB device.

config HID_TWINHAN
tristate "Twinhan IR remote control"
depends on HID
Expand Down
3 changes: 2 additions & 1 deletion drivers/hid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Makefile for the HID driver
#
hid-y := hid-core.o hid-input.o
hid-y := hid-core.o hid-input.o hid-quirks.o
hid-$(CONFIG_DEBUG_FS) += hid-debug.o

obj-$(CONFIG_HID) += hid.o
Expand Down Expand Up @@ -52,6 +52,7 @@ obj-$(CONFIG_HID_HOLTEK) += hid-holtekff.o
obj-$(CONFIG_HID_HYPERV_MOUSE) += hid-hyperv.o
obj-$(CONFIG_HID_ICADE) += hid-icade.o
obj-$(CONFIG_HID_ITE) += hid-ite.o
obj-$(CONFIG_HID_JABRA) += hid-jabra.o
obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o
obj-$(CONFIG_HID_KEYTOUCH) += hid-keytouch.o
obj-$(CONFIG_HID_KYE) += hid-kye.o
Expand Down
41 changes: 37 additions & 4 deletions drivers/hid/hid-asus.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* any later version.
*/

#include <linux/dmi.h>
#include <linux/hid.h>
#include <linux/module.h>
#include <linux/input/mt.h>
Expand Down Expand Up @@ -119,6 +120,24 @@ static const struct asus_touchpad_info asus_t100ta_tp = {
.max_contacts = 5,
};

static const struct asus_touchpad_info asus_t100ha_tp = {
.max_x = 2640,
.max_y = 1320,
.res_x = 30, /* units/mm */
.res_y = 29, /* units/mm */
.contact_size = 5,
.max_contacts = 5,
};

static const struct asus_touchpad_info asus_t200ta_tp = {
.max_x = 3120,
.max_y = 1716,
.res_x = 30, /* units/mm */
.res_y = 28, /* units/mm */
.contact_size = 5,
.max_contacts = 5,
};

static const struct asus_touchpad_info asus_t100chi_tp = {
.max_x = 2640,
.max_y = 1320,
Expand Down Expand Up @@ -606,7 +625,17 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)

if (intf->altsetting->desc.bInterfaceNumber == T100_TPAD_INTF) {
drvdata->quirks = QUIRK_SKIP_INPUT_MAPPING;
drvdata->tp = &asus_t100ta_tp;
/*
* The T100HA uses the same USB-ids as the T100TAF and
* the T200TA uses the same USB-ids as the T100TA, while
* both have different max x/y values as the T100TA[F].
*/
if (dmi_match(DMI_PRODUCT_NAME, "T100HAN"))
drvdata->tp = &asus_t100ha_tp;
else if (dmi_match(DMI_PRODUCT_NAME, "T200TA"))
drvdata->tp = &asus_t200ta_tp;
else
drvdata->tp = &asus_t100ta_tp;
}
}

Expand Down Expand Up @@ -686,9 +715,10 @@ static __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc,
hid_info(hdev, "Fixing up Asus notebook report descriptor\n");
rdesc[55] = 0xdd;
}
/* For the T100TA keyboard dock */
/* For the T100TA/T200TA keyboard dock */
if (drvdata->quirks & QUIRK_T100_KEYBOARD &&
*rsize == 76 && rdesc[73] == 0x81 && rdesc[74] == 0x01) {
(*rsize == 76 || *rsize == 101) &&
rdesc[73] == 0x81 && rdesc[74] == 0x01) {
hid_info(hdev, "Fixing up Asus T100 keyb report descriptor\n");
rdesc[74] &= ~HID_MAIN_ITEM_CONSTANT;
}
Expand Down Expand Up @@ -751,7 +781,10 @@ static const struct hid_device_id asus_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD3), QUIRK_G752_KEYBOARD },
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
USB_DEVICE_ID_ASUSTEK_T100_KEYBOARD),
USB_DEVICE_ID_ASUSTEK_T100TA_KEYBOARD),
QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK,
USB_DEVICE_ID_ASUSTEK_T100TAF_KEYBOARD),
QUIRK_T100_KEYBOARD | QUIRK_NO_CONSUMER_USAGES },
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_ASUS_AK1D) },
{ HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_ASUS_MD_5110) },
Expand Down
Loading

0 comments on commit 183b636

Please sign in to comment.