diff options
author | Jiri Kosina <jkosina@suse.cz> | 2017-11-22 05:19:51 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-11-24 08:40:23 -0500 |
commit | 9abd04af951e5734c9d5cfee9b49790844b734cf (patch) | |
tree | 2eff2f8d420d6ca59fc41f094b2311a54827c445 | |
parent | 20df15783a44a289aaa8c8f83b3f715f9040c9c2 (diff) |
HID: elo: clear BTN_LEFT mapping
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.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/hid-elo.c | 6 |
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, | |||
42 | { | 42 | { |
43 | struct input_dev *input = hidinput->input; | 43 | struct input_dev *input = hidinput->input; |
44 | 44 | ||
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); | ||
45 | set_bit(BTN_TOUCH, input->keybit); | 51 | set_bit(BTN_TOUCH, input->keybit); |
46 | set_bit(ABS_PRESSURE, input->absbit); | 52 | set_bit(ABS_PRESSURE, input->absbit); |
47 | input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0); | 53 | input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0); |