summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2018-01-31 16:22:06 +0100
committerJiri Kosina <jkosina@suse.cz>2018-01-31 16:22:06 +0100
commita44f3ec625002a3631f95ea317a9c25f70578fe7 (patch)
treec625e7a6aaeb58d2fa567070ab8acfffe4179204 /drivers
parent790844941ae2d0ccde5892140cc499982800dd46 (diff)
parent9abd04af951e5734c9d5cfee9b49790844b734cf (diff)
Merge branch 'for-4.16/elo' into for-linus
Pull hid-elo device detection fix
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hid/hid-elo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/hid/hid-elo.c b/drivers/hid/hid-elo.c
index 0cd4f7216239..5eea6fe0d7bd 100644
--- a/drivers/hid/hid-elo.c
+++ b/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);