瀏覽代碼

Merge branch 'for-4.16/elo' into for-linus

Pull hid-elo device detection fix
Jiri Kosina 7 年之前
父節點
當前提交
a44f3ec625
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      drivers/hid/hid-elo.c

+ 6 - 0
drivers/hid/hid-elo.c

@@ -42,6 +42,12 @@ static int elo_input_configured(struct hid_device *hdev,
 {
 	struct input_dev *input = hidinput->input;
 
+	/*
+	 * ELO devices have one Button usage in GenDesk field, which makes
+	 * hid-input map it to BTN_LEFT; that confuses userspace, which then
+	 * considers the device to be a mouse/touchpad instead of touchscreen.
+	 */
+	clear_bit(BTN_LEFT, input->keybit);
 	set_bit(BTN_TOUCH, input->keybit);
 	set_bit(ABS_PRESSURE, input->absbit);
 	input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0);