HID: Wacom: switch Dell canvas into highres mode
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Fri, 3 Nov 2017 17:29:47 +0000 (18:29 +0100)
committerJiri Kosina <jkosina@suse.cz>
Fri, 10 Nov 2017 08:39:44 +0000 (09:39 +0100)
The Dell Canvas exports 2 collections for the Pen part. The only
difference between the 2 is that the default one has half the resolution
of the second one.

The Windows driver switches the tablet into the second mode, so we should
behave the same.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c

index 735bfbbcaa827a5dcc1a49cbab99925ed4dd2ee0..ab3178bef0b699eeb63eb3444a086295038a5b94 100644 (file)
@@ -196,6 +196,13 @@ static void wacom_feature_mapping(struct hid_device *hdev,
                kfree(data);
                break;
        }
+
+       if (hdev->vendor == USB_VENDOR_ID_WACOM &&
+           hdev->product == 0x4200 /* Dell Canvas 27 */ &&
+           field->application == HID_UP_MSVENDOR) {
+               wacom->wacom_wac.mode_report = field->report->id;
+               wacom->wacom_wac.mode_value = 2;
+       }
 }
 
 /*