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

Commit 77ede3a0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull HID subsystem fixes from Jiri Kosina:

 - buffer management size fix for i2c-hid driver, from Adrian Salido

 - tool ID regression fixes for Wacom driver from Jason Gerecke

 - a few small assorted fixes and a few device ID additions

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  Revert "HID: multitouch: Support ALPS PTP stick with pid 0x120A"
  HID: hidraw: fix power sequence when closing device
  HID: wacom: Always increment hdev refcount within wacom_get_hdev_data
  HID: wacom: generic: Clear ABS_MISC when tool leaves proximity
  HID: wacom: generic: Send MSC_SERIAL and ABS_MISC when leaving prox
  HID: i2c-hid: allocate hid buffers for real worst case
  HID: rmi: Make sure the HID device is opened on resume
  HID: multitouch: Support ALPS PTP stick with pid 0x120A
  HID: multitouch: support buttons and trackpoint on Lenovo X1 Tab Gen2
  HID: wacom: Correct coordinate system of touchring and pen twist
  HID: wacom: Properly report negative values from Intuos Pro 2 Bluetooth
  HID: multitouch: Fix system-control buttons not working
  HID: add multi-input quirk for IDC6680 touchscreen
  HID: wacom: leds: Don't try to control the EKR's read-only LEDs
  HID: wacom: bits shifted too much for 9th and 10th buttons
parents 9a431ef9 66dcdafe
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -533,6 +533,7 @@
#define USB_VENDOR_ID_IDEACOM		0x1cb6
#define USB_DEVICE_ID_IDEACOM_IDC6650	0x6650
#define USB_DEVICE_ID_IDEACOM_IDC6651	0x6651
#define USB_DEVICE_ID_IDEACOM_IDC6680	0x6680

#define USB_VENDOR_ID_ILITEK		0x222a
#define USB_DEVICE_ID_ILITEK_MULTITOUCH	0x0001
@@ -660,6 +661,7 @@
#define USB_DEVICE_ID_LENOVO_CBTKBD	0x6048
#define USB_DEVICE_ID_LENOVO_TPPRODOCK	0x6067
#define USB_DEVICE_ID_LENOVO_X1_COVER	0x6085
#define USB_DEVICE_ID_LENOVO_X1_TAB	0x60a3

#define USB_VENDOR_ID_LG		0x1fd2
#define USB_DEVICE_ID_LG_MULTITOUCH	0x0064
+7 −0
Original line number Diff line number Diff line
@@ -930,6 +930,7 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
	    field->application != HID_DG_PEN &&
	    field->application != HID_DG_TOUCHPAD &&
	    field->application != HID_GD_KEYBOARD &&
	    field->application != HID_GD_SYSTEM_CONTROL &&
	    field->application != HID_CP_CONSUMER_CONTROL &&
	    field->application != HID_GD_WIRELESS_RADIO_CTLS &&
	    !(field->application == HID_VD_ASUS_CUSTOM_MEDIA_KEYS &&
@@ -1419,6 +1420,12 @@ static const struct hid_device_id mt_devices[] = {
			USB_VENDOR_ID_ALPS_JP,
			HID_DEVICE_ID_ALPS_U1_DUAL_3BTN_PTP) },

	/* Lenovo X1 TAB Gen 2 */
	{ .driver_data = MT_CLS_WIN_8_DUAL,
		HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8,
			   USB_VENDOR_ID_LENOVO,
			   USB_DEVICE_ID_LENOVO_X1_TAB) },

	/* Anton devices */
	{ .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
		MT_USB_DEVICE(USB_VENDOR_ID_ANTON,
+10 −3
Original line number Diff line number Diff line
@@ -436,17 +436,24 @@ static int rmi_post_resume(struct hid_device *hdev)
	if (!(data->device_flags & RMI_DEVICE))
		return 0;

	ret = rmi_reset_attn_mode(hdev);
	/* Make sure the HID device is ready to receive events */
	ret = hid_hw_open(hdev);
	if (ret)
		return ret;

	ret = rmi_reset_attn_mode(hdev);
	if (ret)
		goto out;

	ret = rmi_driver_resume(rmi_dev, false);
	if (ret) {
		hid_warn(hdev, "Failed to resume device: %d\n", ret);
		return ret;
		goto out;
	}

	return 0;
out:
	hid_hw_close(hdev);
	return ret;
}
#endif /* CONFIG_PM */

+1 −1
Original line number Diff line number Diff line
@@ -337,8 +337,8 @@ static void drop_ref(struct hidraw *hidraw, int exists_bit)
			kfree(hidraw);
		} else {
			/* close device for last reader */
			hid_hw_power(hidraw->hid, PM_HINT_NORMAL);
			hid_hw_close(hidraw->hid);
			hid_hw_power(hidraw->hid, PM_HINT_NORMAL);
		}
	}
}
+2 −1
Original line number Diff line number Diff line
@@ -543,7 +543,8 @@ static int i2c_hid_alloc_buffers(struct i2c_hid *ihid, size_t report_size)
{
	/* the worst case is computed from the set_report command with a
	 * reportID > 15 and the maximum report length */
	int args_len = sizeof(__u8) + /* optional ReportID byte */
	int args_len = sizeof(__u8) + /* ReportID */
		       sizeof(__u8) + /* optional ReportID byte */
		       sizeof(__u16) + /* data register */
		       sizeof(__u16) + /* size of the report */
		       report_size; /* report */
Loading