From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Rong Zhang <i@rong.moe>
Cc: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
Peter Hutterer <peter.hutterer@who-t.net>,
linux-input <linux-input@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] Adding device-initiated haptic feedback knobs for pressurepads
Date: Tue, 16 Jun 2026 11:56:56 -0700 [thread overview]
Message-ID: <ajGbFNj73yxaEj0y@google.com> (raw)
In-Reply-To: <bbee6e61a243a0ae4db6ea155909607326a80dac.camel@rong.moe>
Hi Rong,
On Tue, Jun 16, 2026 at 11:34:45PM +0800, Rong Zhang wrote:
> Hi all,
>
> A pressurepad is a MT touchpad that simulates haptic feedback. The
> haptic feedback may be either device-initiated or host-initiated. While
> drivers/hid/hid-haptic.c [1] provides comprehensive support for host-
> initiated ones, device-initiated ones are currently not configurable at
> all.
>
> According to Microsoft's Input Device Haptics Implementation Guide [2],
> pressurepads with device-initiated haptic feedback can support
> SET_FEATURE reports to allow users to customize the intensity of the
> haptic feedback (usage page 0x0e Haptics, usage 0x23 Intensity) and/or
> the force required to trigger a button press (usage page 0x0d
> Digitizers, usage 0xb0 Button Press Threshold). Each knob should occupy
> a dedicated report ID.
>
> The first knob maps to "ClickForceSensitivity" in Windows registry and
> "Touchpad feedback" => "Intensity" in Windows Settings [3]. The second
> knob maps to "ClickForceSensitivity" in Windows registry.
>
> The pressurepad on my laptop supports the first knob:
>
> # 0x05, 0x0e, // Usage Page (Haptic) 595
> # 0x09, 0x01, // Usage (Simple Haptic Controller) 597
> # 0xa1, 0x02, // Collection (Logical) 599
> # 0x09, 0x23, // Usage (Intensity) 601
> # 0x85, 0x09, // Report ID (9) 603
> # 0x15, 0x00, // Logical Minimum (0) 605
> # 0x25, 0x64, // Logical Maximum (100) 607
> # 0x75, 0x08, // Report Size (8) 609
> # 0x95, 0x01, // Report Count (1) 611
> # 0xb1, 0x02, // Feature (Data,Var,Abs) 613
> # 0xc0, // End Collection 615
>
> I hardly use Windows but the last time I booted it I did see "Touchpad
> feedback" => "Intensity" in Windows Settings.
>
> On Linux, I can tune the knob by setting the corresponding feature
> report via HIDRAW. The pressurepad remembers the knob value until it
> loses power. However, getting the feature report returns garbage data
> (probably from the last input report in the buffer), which makes some
> sense as the implementation guide only requires SET_FEATURE support.
>
> I'd like to add device-initiated haptic feedback configurations for
> Linux. For now, I only focus on the first knob, i.e., Haptics Intensity,
> since it's supported on my device. If I somehow get a device with the
> second knob I may work on it too.
The question is why would we want to support device-initiated feedback
instead of enhancing userspace to fully control it. For the record on
ChromeOS we tried implementing support for device-initiated feedback but
it made the kernel code very cumbersome and left a lot of gaps/rough
edges when combining device- and host-initiated haptic effects.
I'd prefer it all being driven from userspace.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2026-06-16 18:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 15:34 [RFC] Adding device-initiated haptic feedback knobs for pressurepads Rong Zhang
2026-06-16 18:56 ` Dmitry Torokhov [this message]
2026-06-16 19:05 ` Rong 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=ajGbFNj73yxaEj0y@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=bentiss@kernel.org \
--cc=i@rong.moe \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.hutterer@who-t.net \
/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.