aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-multitouch.c
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>2012-11-14 10:59:20 -0500
committerJiri Kosina <jkosina@suse.cz>2012-11-15 04:09:48 -0500
commit20b60e6dee316cba4092cc7aef391fc6f4491028 (patch)
treee3682757e5517c37eef752dc14569135eb9aa6d0 /drivers/hid/hid-multitouch.c
parent349fd6705b13946c04794bf27d67282940aa46b8 (diff)
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>
Diffstat (limited to 'drivers/hid/hid-multitouch.c')
-rw-r--r--drivers/hid/hid-multitouch.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index a2963b238fde..ffdbc70eb5ba 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -502,7 +502,7 @@ static int mt_compute_slot(struct mt_device *td, struct input_dev *input)
502 */ 502 */
503static void mt_complete_slot(struct mt_device *td, struct input_dev *input) 503static void mt_complete_slot(struct mt_device *td, struct input_dev *input)
504{ 504{
505 if (td->curvalid) { 505 if (td->curvalid || (td->mtclass.quirks & MT_QUIRK_ALWAYS_VALID)) {
506 int slotnum = mt_compute_slot(td, input); 506 int slotnum = mt_compute_slot(td, input);
507 struct mt_slot *s = &td->curdata; 507 struct mt_slot *s = &td->curdata;
508 508
@@ -553,9 +553,7 @@ static int mt_event(struct hid_device *hid, struct hid_field *field,
553 if (hid->claimed & HID_CLAIMED_INPUT) { 553 if (hid->claimed & HID_CLAIMED_INPUT) {
554 switch (usage->hid) { 554 switch (usage->hid) {
555 case HID_DG_INRANGE: 555 case HID_DG_INRANGE:
556 if (quirks & MT_QUIRK_ALWAYS_VALID) 556 if (quirks & MT_QUIRK_VALID_IS_INRANGE)
557 td->curvalid = true;
558 else if (quirks & MT_QUIRK_VALID_IS_INRANGE)
559 td->curvalid = value; 557 td->curvalid = value;
560 break; 558 break;
561 case HID_DG_TIPSWITCH: 559 case HID_DG_TIPSWITCH: