]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/hid/wacom_wac.c
Merge branch 'for-4.1/wacom' into for-next
[karo-tx-linux.git] / drivers / hid / wacom_wac.c
index 5c7a924fe2ed5a717220afbd2ca729d418b95ccc..d139860b9e664a779e731d6a426ab3c802bf5115 100644 (file)
@@ -447,6 +447,19 @@ exit:
        return retval;
 }
 
+static void wacom_intuos_schedule_prox_event(struct wacom_wac *wacom_wac)
+{
+       struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
+       struct hid_report *r;
+       struct hid_report_enum *re;
+
+       re = &(wacom->hdev->report_enum[HID_FEATURE_REPORT]);
+       r = re->report_id_hash[WACOM_REPORT_INTUOSREAD];
+       if (r) {
+               hid_hw_request(wacom->hdev, r, HID_REQ_GET_REPORT);
+       }
+}
+
 static int wacom_intuos_inout(struct wacom_wac *wacom)
 {
        struct wacom_features *features = &wacom->features;
@@ -626,8 +639,11 @@ static int wacom_intuos_inout(struct wacom_wac *wacom)
        }
 
        /* don't report other events if we don't know the ID */
-       if (!wacom->id[idx])
+       if (!wacom->id[idx]) {
+               /* but reschedule a read of the current tool */
+               wacom_intuos_schedule_prox_event(wacom);
                return 1;
+       }
 
        return 0;
 }