Re: [RFC] Adding device-initiated haptic feedback knobs for pressurepads

From: Rong Zhang

Date: Tue Jun 16 2026 - 15:11:03 EST


Hi Dmitry,

On Tue, 2026-06-16 at 11:56 -0700, Dmitry Torokhov wrote:
> 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.

Sorry, I didn't explain it clearly enough.

Most Windows laptops shipping with a pressurepad don't support host-
initiated feedback at all. That's also the case of my device.

>
> I'd prefer it all being driven from userspace.

... so The only force feedback stuff we can control on these
pressurepads are the said one or two knobs, really :-(

Hopefully one day we will live in a host-initiated haptic world...

Thanks,
Rong

>
> Thanks.