Skip to content

Commit 20b60e6

Browse files
bentissJiri Kosina
authored andcommitted
HID: multitouch: move ALWAYS_VALID quirk check
Win 8 device specification changed the requirements for the hid usages of the multitouch devices. Now InRange is optional and must be only used when the device supports hovering. This ensures that the quirk ALWAYS_VALID is taken into account and also ensures its precedence over the other VALID* quirks. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1 parent 349fd67 commit 20b60e6

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎drivers/hid/hid-multitouch.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ static int mt_compute_slot(struct mt_device *td, struct input_dev *input)
502502
*/
503503
static void mt_complete_slot(struct mt_device *td, struct input_dev *input)
504504
{
505-
if (td->curvalid) {
505+
if (td->curvalid || (td->mtclass.quirks & MT_QUIRK_ALWAYS_VALID)) {
506506
int slotnum = mt_compute_slot(td, input);
507507
struct mt_slot *s = &td->curdata;
508508

@@ -553,9 +553,7 @@ static int mt_event(struct hid_device *hid, struct hid_field *field,
553553
if (hid->claimed & HID_CLAIMED_INPUT) {
554554
switch (usage->hid) {
555555
case HID_DG_INRANGE:
556-
if (quirks & MT_QUIRK_ALWAYS_VALID)
557-
td->curvalid = true;
558-
else if (quirks & MT_QUIRK_VALID_IS_INRANGE)
556+
if (quirks & MT_QUIRK_VALID_IS_INRANGE)
559557
td->curvalid = value;
560558
break;
561559
case HID_DG_TIPSWITCH:

0 commit comments

Comments
 (0)