From: Siarhei Vishniakou <svv@google.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
Ping Cheng <ping.cheng@wacom.com>,
Jason Gerecke <jason.gerecke@wacom.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
Henrik Rydberg <rydberg@bitmath.org>,
linux-input@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Siarhei Vishniakou <svv@google.com>
Subject: [PATCH 0/3] Input: add ABS_TWIST and support it in HID and Wacom
Date: Mon, 9 Nov 2026 18:06:29 -0800 [thread overview]
Message-ID: <20261110020632.4003499-1-svv@google.com> (raw)
Some styli can report rotation along their long ("barrel") axis,
commonly referred to as "twist". While the HID specification defines
this usage as HID_DG_TWIST (0x000d0041) in the Digitizers page, there is
currently no corresponding evdev axis code to expose it to userspace.
Because evdev has no MSC_SCAN equivalent for axes, drivers and OEMs
currently work around this by mapping stylus twist onto unrelated axes
such as ABS_Z or ABS_RZ. As a result, userspace input stacks must
maintain device-specific workarounds to know which axis carries twist.
This series introduces a dedicated ABS_TWIST (0x1d) axis for single-tool
devices such as styli and wires it up in the HID subsystem:
1. Input: Define ABS_TWIST (0x1d) in input-event-codes.h and document it
in event-codes.rst with resolution in units/radian.
2. HID: Map HID_DG_TWIST (0x000d0041) to ABS_TWIST in hid-input, compute
its resolution in units/radian, and add KUnit test coverage.
3. HID: wacom: Report pen twist on ABS_TWIST in addition to ABS_Z so
that userspace can use the standard axis while maintaining backward
compatibility with existing applications that expect ABS_Z.
Siarhei Vishniakou (3):
Input: add ABS_TWIST event code
HID: input: map Digitizers Twist usage to ABS_TWIST
HID: wacom: report ABS_TWIST alongside ABS_Z for pen twist
Documentation/input/event-codes.rst | 6 ++
drivers/hid/hid-debug.c | 1 +
drivers/hid/hid-input-test.c | 87 ++++++++++++++++++++++++++
drivers/hid/hid-input.c | 5 ++
drivers/hid/wacom_wac.c | 35 +++++++++--
include/uapi/linux/input-event-codes.h | 1 +
6 files changed, 129 insertions(+), 6 deletions(-)
--
2.56.0.455.g6c5a503b38-goog
next reply other threads:[~2026-11-10 2:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 2:06 Siarhei Vishniakou [this message]
2026-11-10 2:06 ` [PATCH 1/3] Input: add ABS_TWIST event code Siarhei Vishniakou
2026-11-10 2:06 ` [PATCH 2/3] HID: input: map Digitizers Twist usage to ABS_TWIST Siarhei Vishniakou
2026-11-10 2:06 ` [PATCH 3/3] HID: wacom: report ABS_TWIST alongside ABS_Z for pen twist Siarhei Vishniakou
2026-11-10 2:25 ` [PATCH 0/3] Input: add ABS_TWIST and support it in HID and Wacom Dmitry Torokhov
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=20261110020632.4003499-1-svv@google.com \
--to=svv@google.com \
--cc=bentiss@kernel.org \
--cc=corbet@lwn.net \
--cc=dmitry.torokhov@gmail.com \
--cc=jason.gerecke@wacom.com \
--cc=jikos@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ping.cheng@wacom.com \
--cc=rydberg@bitmath.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®