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

Commit c6b9e73f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: avoid '\0' in hid debugfs events file
  HID: Add RGT Clutch Wheel clutch device id
  HID: ntrig: fix touch events
  HID: add quirk for UC-Logik WP4030 tablet
  HID: magicmouse: fix oops after device removal
parents 441f4058 e639ba48
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1357,6 +1357,7 @@ static const struct hid_device_id hid_blacklist[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb324) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb653) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) },
+3 −3
Original line number Diff line number Diff line
@@ -564,10 +564,10 @@ void hid_debug_event(struct hid_device *hdev, char *buf)
	struct hid_debug_list *list;

	list_for_each_entry(list, &hdev->debug_list, node) {
		for (i = 0; i <= strlen(buf); i++)
			list->hid_debug_buf[(list->tail + i) % (HID_DEBUG_BUFSIZE - 1)] =
		for (i = 0; i < strlen(buf); i++)
			list->hid_debug_buf[(list->tail + i) % HID_DEBUG_BUFSIZE] =
				buf[i];
		list->tail = (list->tail + i) % (HID_DEBUG_BUFSIZE - 1);
		list->tail = (list->tail + i) % HID_DEBUG_BUFSIZE;
        }
}
EXPORT_SYMBOL_GPL(hid_debug_event);
+1 −0
Original line number Diff line number Diff line
@@ -445,6 +445,7 @@

#define USB_VENDOR_ID_UCLOGIC		0x5543
#define USB_DEVICE_ID_UCLOGIC_TABLET_PF1209	0x0042
#define USB_DEVICE_ID_UCLOGIC_TABLET_WP4030U	0x0003

#define USB_VENDOR_ID_VERNIER		0x08f7
#define USB_DEVICE_ID_VERNIER_LABPRO	0x0001
+5 −2
Original line number Diff line number Diff line
@@ -353,7 +353,7 @@ static int magicmouse_probe(struct hid_device *hdev,
		goto err_free;
	}

	ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
	ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_HIDINPUT);
	if (ret) {
		dev_err(&hdev->dev, "magicmouse hw start failed\n");
		goto err_free;
@@ -409,8 +409,11 @@ static int magicmouse_probe(struct hid_device *hdev,

static void magicmouse_remove(struct hid_device *hdev)
{
	struct magicmouse_sc *msc = hid_get_drvdata(hdev);

	hid_hw_stop(hdev);
	kfree(hid_get_drvdata(hdev));
	input_unregister_device(msc->input);
	kfree(msc);
}

static const struct hid_device_id magic_mice[] = {
+11 −0
Original line number Diff line number Diff line
@@ -140,6 +140,9 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
			nd->reading_mt = 1;
			nd->first_contact_confidence = 0;
			break;
		case HID_DG_TIPSWITCH:
			/* Prevent emission of touch until validated */
			return 1;
		case HID_DG_CONFIDENCE:
			nd->confidence = value;
			break;
@@ -259,6 +262,7 @@ static int ntrig_event (struct hid_device *hid, struct hid_field *field,
						BTN_TOOL_TRIPLETAP, 0);
				input_report_key(input,
						BTN_TOOL_QUADTAP, 0);
				input_report_key(input, BTN_TOUCH, 0);
			}
			break;

@@ -308,13 +312,20 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)


	list_for_each_entry(hidinput, &hdev->inputs, list) {
		if (hidinput->report->maxfield < 1)
			continue;

		input = hidinput->input;
		switch (hidinput->report->field[0]->application) {
		case HID_DG_PEN:
			input->name = "N-Trig Pen";
			break;
		case HID_DG_TOUCHSCREEN:
			/* These keys are redundant for fingers, clear them
			 * to prevent incorrect identification */
			__clear_bit(BTN_TOOL_PEN, input->keybit);
			__clear_bit(BTN_TOOL_FINGER, input->keybit);
			__clear_bit(BTN_0, input->keybit);
			/*
			 * A little something special to enable
			 * two and three finger taps.
Loading