All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Mastykin <dmastykin@astralinux.ru>
To: linux-input@vger.kernel.org
Subject: Upd: hid-multitouch: is pen hovering ever possible?
Date: Fri, 21 Aug 2020 14:01:40 +0300	[thread overview]
Message-ID: <c484b5f2-d227-6a09-3742-4f9c3c25d779@astralinux.ru> (raw)
In-Reply-To: <0322c725-9eea-2947-bcf1-89958d91db92@astralinux.ru>

[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

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@astralinux.ru>
To: linux-input@vger.kernel.org

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


[-- Attachment #2: commit-ae8672d --]
[-- Type: text/plain, Size: 731 bytes --]

From ae8672dc7020ed93a7dfbb6d797aea85466f236b Mon Sep 17 00:00:00 2001
From: Dmitry Mastykin <dmastykin@astralinux.ru>
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);

      reply	other threads:[~2020-08-21 11:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21 10:24 hid-multitouch: is pen hovering ever possible? Dmitry Mastykin
2020-08-21 11:01 ` Dmitry Mastykin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c484b5f2-d227-6a09-3742-4f9c3c25d779@astralinux.ru \
    --to=dmastykin@astralinux.ru \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.