Skip to content

Commit a44f3ec

Browse files
author
Jiri Kosina
committed
Merge branch 'for-4.16/elo' into for-linus
Pull hid-elo device detection fix
2 parents 7908449 + 9abd04a commit a44f3ec

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/hid/hid-elo.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ static int elo_input_configured(struct hid_device *hdev,
4242
{
4343
struct input_dev *input = hidinput->input;
4444

45+
/*
46+
* ELO devices have one Button usage in GenDesk field, which makes
47+
* hid-input map it to BTN_LEFT; that confuses userspace, which then
48+
* considers the device to be a mouse/touchpad instead of touchscreen.
49+
*/
50+
clear_bit(BTN_LEFT, input->keybit);
4551
set_bit(BTN_TOUCH, input->keybit);
4652
set_bit(ABS_PRESSURE, input->absbit);
4753
input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0);

0 commit comments

Comments
 (0)