Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 851328fe authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull HID updates from Jiri Kosina:
 "to receive patches queued for 4.3 merge window in HID tree. Highlights:

   - a lot of improvements (regarding supported features and devices) to
     Wacom driver, from Aaron Skomra and Jason Gerecke
   - a lot of functional fixes and support for large I2C transfer to
     cp2112 driver, from Ellen Wang
   - HW support improvements to RMI driver, from Andrew Duggan
   - quite some small fixes and device ID additions all over the place"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (44 commits)
  HID: wacom: wacom_setup_numbered_buttons is local to wacom_wac
  HID: wacom: Add support for Express Key Remote.
  HID: wacom: Set button bits based on a new numbered_buttons
  HID: quirks: add QUIRK_NOGET for an other TPV touchscreen
  HID: usbhid: Fix the check for HID_RESET_PENDING in hid_io_error
  HID: i2c-hid: Only disable irq wake if it was successfully enabled during suspend
  HID: wacom: Use tablet-provided touch height/width values for INTUOSHT
  HID: gembird: add new driver to fix Gembird JPD-DualForce 2
  HID: lenovo: Hide middle-button press until release
  HID: lenovo: Add missing return-value check
  HID: lenovo: Use constants for axes names
  HID: wacom: Simplify 'wacom_pl_irq'
  HID: wacom: Do not repeatedly attempt to set device mode on error
  HID: wacom: Do not repeatedly attempt to set device mode on error
  HID: wacom: Remove WACOM_QUIRK_NO_INPUT
  HID: wacom: Replace WACOM_QUIRK_MONITOR with WACOM_DEVICETYPE_WL_MONITOR
  HID: wacom: Use calculated pkglen for wireless touch interface
  HID: sony: Fix DS4 controller reporting rate issues
  HID: chicony: Add support for Acer Aspire Switch 12
  HID: hid-lg: Add USBID for Logitech G29 Wheel
  ...
parents 2d678b68 f212bd95
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -77,3 +77,22 @@ Description:
		The format is also scrambled, like in the USB mode, and it can
		be summarized by converting 76543210 into GECA6420.
					    HGFEDCBA      HFDB7531

What:		/sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_remote/unpair_remote
Date:		July 2015
Contact:	linux-input@vger.kernel.org
Description:
		Writing the character sequence '*' followed by a newline to
		this file will delete all of the current pairings on the
		device. Other character sequences are reserved. This file is
		write only.

What:		/sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_remote/<serial_number>/remote_mode
Date:		July 2015
Contact:	linux-input@vger.kernel.org
Description:
		Reading from this file reports the mode status of the
		remote as indicated by the LED lights on the device. If no
		reports have been received from the paired device, reading
		from this file will report '-1'. The mode is read-only
		and cannot be set through the driver.
+7 −0
Original line number Diff line number Diff line
@@ -251,6 +251,12 @@ config HID_EZKEY
	---help---
	Support for Ezkey BTC 8193 keyboard.

config HID_GEMBIRD
	tristate "Gembird Joypad"
	depends on HID
	---help---
	Support for Gembird JPD-DualForce 2.

config HID_HOLTEK
	tristate "Holtek HID devices"
	depends on USB_HID
@@ -480,6 +486,7 @@ config HID_MULTITOUCH
	  - Atmel panels
	  - Cando dual touch panels
	  - Chunghwa panels
	  - CJTouch panels
	  - CVTouch panels
	  - Cypress TrueTouch panels
	  - Elan Microelectronics touch panels
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ 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_GEMBIRD)	+= hid-gembird.o
obj-$(CONFIG_HID_GT683R)	+= hid-gt683r.o
obj-$(CONFIG_HID_GYRATION)	+= hid-gyration.o
obj-$(CONFIG_HID_HOLTEK)	+= hid-holtek-kbd.o
+26 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <linux/input.h>
#include <linux/hid.h>
#include <linux/module.h>
#include <linux/usb.h>

#include "hid-ids.h"

@@ -57,10 +58,34 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
	return 1;
}

static __u8 *ch_switch12_report_fixup(struct hid_device *hdev, __u8 *rdesc,
		unsigned int *rsize)
{
	struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
	
	if (intf->cur_altsetting->desc.bInterfaceNumber == 1) {
		/* Change usage maximum and logical maximum from 0x7fff to
		 * 0x2fff, so they don't exceed HID_MAX_USAGES */
		switch (hdev->product) {
		case USB_DEVICE_ID_CHICONY_ACER_SWITCH12:
			if (*rsize >= 128 && rdesc[64] == 0xff && rdesc[65] == 0x7f
					&& rdesc[69] == 0xff && rdesc[70] == 0x7f) {
				hid_info(hdev, "Fixing up report descriptor\n");
				rdesc[65] = rdesc[70] = 0x2f;
			}
			break;
		}

	}
	return rdesc;
}


static const struct hid_device_id ch_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_AK1D) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_ACER_SWITCH12) },
	{ }
};
MODULE_DEVICE_TABLE(hid, ch_devices);
@@ -68,6 +93,7 @@ MODULE_DEVICE_TABLE(hid, ch_devices);
static struct hid_driver ch_driver = {
	.name = "chicony",
	.id_table = ch_devices,
	.report_fixup = ch_switch12_report_fixup,
	.input_mapping = ch_input_mapping,
};
module_hid_driver(ch_driver);
+26 −3
Original line number Diff line number Diff line
@@ -427,6 +427,7 @@ static int hid_parser_local(struct hid_parser *parser, struct hid_item *item)
{
	__u32 data;
	unsigned n;
	__u32 count;

	data = item_udata(item);

@@ -490,6 +491,24 @@ static int hid_parser_local(struct hid_parser *parser, struct hid_item *item)
		if (item->size <= 2)
			data = (parser->global.usage_page << 16) + data;

		count = data - parser->local.usage_minimum;
		if (count + parser->local.usage_index >= HID_MAX_USAGES) {
			/*
			 * We do not warn if the name is not set, we are
			 * actually pre-scanning the device.
			 */
			if (dev_name(&parser->device->dev))
				hid_warn(parser->device,
					 "ignoring exceeding usage max\n");
			data = HID_MAX_USAGES - parser->local.usage_index +
				parser->local.usage_minimum - 1;
			if (data <= 0) {
				hid_err(parser->device,
					"no more usage index available\n");
				return -1;
			}
		}

		for (n = parser->local.usage_minimum; n <= data; n++)
			if (hid_add_usage(parser, n)) {
				dbg_hid("hid_add_usage failed\n");
@@ -705,8 +724,9 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type)
		hid->group = HID_GROUP_SENSOR_HUB;

	if (hid->vendor == USB_VENDOR_ID_MICROSOFT &&
	    (hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 ||
	     hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3_JP ||
	    (hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 ||
	     hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP ||
	     hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 ||
	     hid->product == USB_DEVICE_ID_MS_POWER_COVER) &&
	    hid->group == HID_GROUP_MULTITOUCH)
		hid->group = HID_GROUP_GENERIC;
@@ -1807,6 +1827,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_AK1D) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_ACER_SWITCH12) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_CP2112) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) },
@@ -1823,6 +1844,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
	{ 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) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_GEMBIRD, USB_DEVICE_ID_GEMBIRD_JPD_DUALFORCE2) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0003) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0012) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) },
@@ -1905,8 +1927,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_OFFICE_KB) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3_JP) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL) },
Loading