linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Torge Matthies <openglfreak@googlemail.com>
To: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-input@vger.kernel.org
Cc: "Nikolai Kondrashov" <spbnick@gmail.com>,
	"José Expósito" <jose.exposito89@gmail.com>,
	"Torge Matthies" <openglfreak@googlemail.com>
Subject: [PATCH] HID: Accept Digitizers as input devices
Date: Thu,  4 Aug 2022 17:18:32 +0200	[thread overview]
Message-ID: <20220804151832.30373-1-openglfreak@googlemail.com> (raw)

Commit f7d8e387d9ae ("HID: uclogic: Switch to Digitizer usage for
styluses") broke input from my XP-Pen Star G640. This is because the
"Digitizer" usage is not recognized as a valid usage for input devices.

This patch changes the IS_INPUT_APPLICATION macro so that the "Digitizer"
(HID_DG_DIGITIZER) usage is recognized as an input device usage.

Fixes: f7d8e387d9ae ("HID: uclogic: Switch to Digitizer usage for styluses")
Signed-off-by: Torge Matthies <openglfreak@googlemail.com>
---
This patch could be risky, because any digitizer devices that were
previously not treated as input devices are now used for input.
Alternatively the linked commit could be reverted, but that would
re-introduce the problem detailed in its commit message.

 include/linux/hid.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/hid.h b/include/linux/hid.h
index 4363a63b9775..07803e144d98 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -883,7 +883,7 @@ static inline bool hid_is_usb(struct hid_device *hdev)
 /* We ignore a few input applications that are not widely used */
 #define IS_INPUT_APPLICATION(a) \
 		(((a >= HID_UP_GENDESK) && (a <= HID_GD_MULTIAXIS)) \
-		|| ((a >= HID_DG_PEN) && (a <= HID_DG_WHITEBOARD)) \
+		|| ((a >= HID_DG_DIGITIZER) && (a <= HID_DG_WHITEBOARD)) \
 		|| (a == HID_GD_SYSTEM_CONTROL) || (a == HID_CP_CONSUMER_CONTROL) \
 		|| (a == HID_GD_WIRELESS_RADIO_CTLS))
 
-- 
2.37.1


             reply	other threads:[~2022-08-04 15:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 15:18 Torge Matthies [this message]
2022-08-04 18:00 ` [PATCH] HID: Accept Digitizers as input devices José Expósito
2022-08-11 15:27   ` Benjamin Tissoires
2022-10-26 22:42     ` Alexander Zhang
2022-10-27 12:06       ` Thorsten Leemhuis
2022-10-27 20:42         ` José Expósito
2022-10-28  3:16         ` Alexander Zhang
2022-11-10 17:48           ` José Expósito
2022-11-12  2:44             ` Alexander Zhang

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=20220804151832.30373-1-openglfreak@googlemail.com \
    --to=openglfreak@googlemail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=jose.exposito89@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=spbnick@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).