Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bbfe28a authored by Jason Gerecke's avatar Jason Gerecke Committed by Jiri Kosina
Browse files

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: default avatarJason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 0402b6b7
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -439,10 +439,14 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
static void wacom_intuos_schedule_prox_event(struct wacom_wac *wacom_wac)
static void wacom_intuos_schedule_prox_event(struct wacom_wac *wacom_wac)
{
{
	struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
	struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
	struct wacom_features *features = &wacom_wac->features;
	struct hid_report *r;
	struct hid_report *r;
	struct hid_report_enum *re;
	struct hid_report_enum *re;


	re = &(wacom->hdev->report_enum[HID_FEATURE_REPORT]);
	re = &(wacom->hdev->report_enum[HID_FEATURE_REPORT]);
	if (features->type == INTUOSHT2)
		r = re->report_id_hash[WACOM_REPORT_INTUOSHT2_ID];
	else
		r = re->report_id_hash[WACOM_REPORT_INTUOS_ID1];
		r = re->report_id_hash[WACOM_REPORT_INTUOS_ID1];
	if (r) {
	if (r) {
		hid_hw_request(wacom->hdev, r, HID_REQ_GET_REPORT);
		hid_hw_request(wacom->hdev, r, HID_REQ_GET_REPORT);
+1 −0
Original line number Original line Diff line number Diff line
@@ -70,6 +70,7 @@
#define WACOM_REPORT_DEVICE_LIST	16
#define WACOM_REPORT_DEVICE_LIST	16
#define WACOM_REPORT_INTUOS_PEN		16
#define WACOM_REPORT_INTUOS_PEN		16
#define WACOM_REPORT_REMOTE		17
#define WACOM_REPORT_REMOTE		17
#define WACOM_REPORT_INTUOSHT2_ID	8


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