Skip to contentSkip to conversation

Patch "HID: elo: clear BTN_LEFT mapping" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Mar 18, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

HID: elo: clear BTN_LEFT mapping

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
hid-elo-clear-btn_left-mapping.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Sun Mar 18 16:55:33 CET 2018

From: Jiri Kosina <[email protected]>
Date: Wed, 22 Nov 2017 11:19:51 +0100
Subject: HID: elo: clear BTN_LEFT mapping

From: Jiri Kosina <[email protected]>

[ Upstream commit 9abd04af951e5734c9d5cfee9b49790844b734cf ]

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.

Fix that by unmapping BTN_LEFT and keeping only BTN_TOUCH in place.

---
 drivers/hid/hid-elo.c |    6 ++++++
 1 file changed, 6 insertions(+)
drivers/hid/hid-elo.c +6 -0
@@ -42,6 +42,12 @@ static int elo_input_configured(struct h
 {
 	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);

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/hid-elo-clear-btn_left-mapping.patch queue-4.9/hid-clamp-input-to-logical-range-if-no-null-state.patch queue-4.9/hid-reject-input-outside-logical-range-only-if-null-state-is-set.patch