Skip to content

Commit

Permalink
Merge branch 'for-4.16/elo' into for-linus
Browse files Browse the repository at this point in the history
Pull hid-elo device detection fix
  • Loading branch information
Jiri Kosina committed Jan 31, 2018
2 parents 7908449 + 9abd04a commit a44f3ec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/hid/hid-elo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a44f3ec

Please sign in to comment.