HID: do not init input reports for Win 8 multitouch devices
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / hid / hid-multitouch.c
index c28ef86..ac28f08 100644 (file)
@@ -951,6 +951,18 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
        hdev->quirks |= HID_QUIRK_MULTI_INPUT;
        hdev->quirks |= HID_QUIRK_NO_EMPTY_INPUT;
 
+       /*
+        * Handle special quirks for Windows 8 certified devices.
+        */
+       if (id->group == HID_GROUP_MULTITOUCH_WIN_8)
+               /*
+                * Some multitouch screens do not like to be polled for input
+                * reports. Fortunately, the Win8 spec says that all touches
+                * should be sent during each report, making the initialization
+                * of input reports unnecessary.
+                */
+               hdev->quirks |= HID_QUIRK_NO_INIT_INPUT_REPORTS;
+
        td = devm_kzalloc(&hdev->dev, sizeof(struct mt_device), GFP_KERNEL);
        if (!td) {
                dev_err(&hdev->dev, "cannot allocate multitouch data\n");