Hello guys,
here is a 3-lines patch that made the pen working with hid-multitouch.
It just delegates pen to hid-input.
Hope it helps someone.
Kind regards,
Dmitry Mastykin
-------- Forwarded Message --------
Subject: hid-multitouch: is pen hovering ever possible?
Date: Fri, 21 Aug 2020 13:24:40 +0300
From: Dmitry Mastykin <dmastykin@xxxxxxxxxxxxx>
To: linux-input@xxxxxxxxxxxxxxx
Hello guys,
thanks to all of you for your great work!
Please, answer, is pen hovering ever possible using hid-multitouch driver?
If I remove hid-multitouch - hovering works well with hid-generic.
I can't unbind from hid-multitouch and bind to hid-generic: bind fails
with "No such device".
I tried to modify hid-multitouch, but was not able to get hovering work
using multitouch reports.
Then I noticed, that wacom uses non-multitouch reports for their pen
devices, and added a quirk to hid-multitouch that changes pen's behavior
to non-multitouch (patch attached). It works, but the way must be wrong(
How should one proceed in right way?
Thank you very much!
Dmitry Mastykin
From ae8672dc7020ed93a7dfbb6d797aea85466f236b Mon Sep 17 00:00:00 2001
From: Dmitry Mastykin <dmastykin@xxxxxxxxxxxxx>
Date: Fri, 21 Aug 2020 13:51:46 +0300
Subject: hid-multitouch: delegate pen to hid-input
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 362805ddf377..41d809947a0a 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1334,6 +1334,11 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
return 1;
}
+ if (field->application == HID_DG_PEN) {
+ rdata->is_mt_collection = false;
+ return 0;
+ }
+
if (rdata->is_mt_collection)
return mt_touch_input_mapping(hdev, hi, field, usage, bit, max,
application);