Skip to content

Commit 0bbfe28

Browse files
jigpuJiri Kosina
authored andcommitted
HID: wacom: Use correct report to query pen ID from INTUOSHT2 devices
Unlike other tablets which are compatible with the wacom_intuos_irq handler, INTUOSHT2 devices provide pen ID with report ID 8 instead of 5. To ensure wacom_intuos_schedule_prox_event works as intended for these tablets, we must be sure it uses the correct report ID in this case. Signed-off-by: Jason Gerecke <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 0402b6b commit 0bbfe28

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

drivers/hid/wacom_wac.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,15 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
439439
static void wacom_intuos_schedule_prox_event(struct wacom_wac *wacom_wac)
440440
{
441441
struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
442+
struct wacom_features *features = &wacom_wac->features;
442443
struct hid_report *r;
443444
struct hid_report_enum *re;
444445

445446
re = &(wacom->hdev->report_enum[HID_FEATURE_REPORT]);
446-
r = re->report_id_hash[WACOM_REPORT_INTUOS_ID1];
447+
if (features->type == INTUOSHT2)
448+
r = re->report_id_hash[WACOM_REPORT_INTUOSHT2_ID];
449+
else
450+
r = re->report_id_hash[WACOM_REPORT_INTUOS_ID1];
447451
if (r) {
448452
hid_hw_request(wacom->hdev, r, HID_REQ_GET_REPORT);
449453
}

drivers/hid/wacom_wac.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
#define WACOM_REPORT_DEVICE_LIST 16
7171
#define WACOM_REPORT_INTUOS_PEN 16
7272
#define WACOM_REPORT_REMOTE 17
73+
#define WACOM_REPORT_INTUOSHT2_ID 8
7374

7475
/* device quirks */
7576
#define WACOM_QUIRK_BBTOUCH_LOWRES 0x0001

0 commit comments

Comments
 (0)