HID: multitouch: fix touchpad buttons
PATCH 1/1 HID: multitouch: fix touchpad buttons
Commit "HID: multitouch: use the callback "report" instead..." breaks the buttons of touchpads following the HID multitouch specification. The buttons were emmitted through hid-input, but as now the events are generated only in hid-multitouch, the buttons are not emmitted anymore.
The input_event() call is far much simpler than the hid-input one as many of the different tests do not apply to multitouch touchpads.
---
Hi guys,
really sorry for that. I forgot that I had in one of my drawer of my desk one prototype of a touchpad following the multitouch specification, but with two physical buttons. And of course, I did not put it in my database, meaning that the support has been broken in the patches already in 3.9.
I don't think it's a big deal (to my knowledge, no retail product uses this feature), but it's still a regression in 3.9.
Cheers,
Benjamin
drivers/hid/hid-multitouch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/hid/hid-multitouch.c +5 -1
@@ -620,6 +620,7 @@ static void mt_process_mt_event(struct hid_device *hid, struct hid_field *field, {struct mt_device *td =hid_get_drvdata (hid);__s32 quirks = td->mtclass.quirks; +struct input_dev *input = field->hidinput->input;if (hid->claimed &HID_CLAIMED_INPUT ) {switch (usage->hid) {
@@ -669,13 +670,16 @@ static void mt_process_mt_event(struct hid_device *hid, struct hid_field *field,break ;default : +if (usage->type) +input_event (input, usage->type, usage->code, + value);return ; }if (usage->usage_index +1 == field->report_count) {/* we only take into account the last report. */ if (usage->hid == td->last_slot_field) -mt_complete_slot (td, field->hidinput->input); +mt_complete_slot (td, input); } }
Signature · 1 line
1.8.1.4
Quoted 13 lines · Benjamin Tissoires
Commit "HID: multitouch: use the callback "report" instead..." breaks the buttons of touchpads following the HID multitouch specification. The buttons were emmitted through hid-input, but as now the events are generated only in hid-multitouch, the buttons are not emmitted anymore.
The
input_event()call is far much simpler than the hid-input one as many of the different tests do not apply to multitouch touchpads.Signed-off-by Benjamin Tissoires <[email protected]>---
Hi guys,
Quoted 7 lines
really sorry for that. I forgot that I had in one of my drawer of my desk one prototype of a touchpad following the multitouch specification, but with two physical buttons. And of course, I did not put it in my database, meaning that the support has been broken in the patches already in 3.9.
I don't think it's a big deal (to my knowledge, no retail product uses this feature), but it's still a regression in 3.9.
I am queuing this for 3.9 still, thanks.
Benjamin, just please double-check that the patch is ok as-is in my for-3.9/upstream-fixes branch, as I had to hand-apply it due to context-related conflicts.
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 9 lines · Jiri Kosina
Quoted 2 lines
I don't think it's a big deal (to my knowledge, no retail product uses this feature), but it's still a regression in 3.9.
I am queuing this for 3.9 still, thanks.
Benjamin, just please double-check that the patch is ok as-is in my for-3.9/upstream-fixes branch, as I had to hand-apply it due to context-related conflicts.
The patch looks good to me. I've run the tests against the touchpad, and it's ok with this version.
So thanks for applying it manually (and sorry).
Cheers,
Benjamin