linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Hutterer <peter.hutterer@who-t.net>
To: Jonathan Denose <jdenose@google.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Henrik Rydberg <rydberg@bitmath.org>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, Angela Czubak <aczubak@google.com>,
	Sean O'Brien <seobrien@google.com>
Subject: Re: [PATCH v3 03/11] Input: add INPUT_PROP_HAPTIC_TOUCHPAD
Date: Fri, 24 Oct 2025 13:30:45 +1000	[thread overview]
Message-ID: <20251024033045.GA48918@quokka> (raw)
In-Reply-To: <20250818-support-forcepads-v3-3-e4f9ab0add84@google.com>

On Mon, Aug 18, 2025 at 11:08:44PM +0000, Jonathan Denose wrote:
> From: Angela Czubak <aczubak@google.com>
> 
> INPUT_PROP_HAPTIC_TOUCHPAD property is to be set for a device with simple
> haptic capabilities.
> 
> Signed-off-by: Angela Czubak <aczubak@google.com>
> Co-developed-by: Jonathan Denose <jdenose@google.com>
> Signed-off-by: Jonathan Denose <jdenose@google.com>
> ---
>  Documentation/input/event-codes.rst    | 14 ++++++++++++++
>  include/uapi/linux/input-event-codes.h |  1 +
>  2 files changed, 15 insertions(+)
> 
> diff --git a/Documentation/input/event-codes.rst b/Documentation/input/event-codes.rst
> index b4557462edd7b3fef9e9cd6c2c3cb2d05bb531ab..1ead9bb8d9c6451a81426665baab643f9e50216a 100644
> --- a/Documentation/input/event-codes.rst
> +++ b/Documentation/input/event-codes.rst
> @@ -400,6 +400,20 @@ can report through the rotational axes (absolute and/or relative rx, ry, rz).
>  All other axes retain their meaning. A device must not mix
>  regular directional axes and accelerometer axes on the same event node.
>  
> +INPUT_PROP_HAPTIC_TOUCHPAD
> +--------------------------
> +
> +The INPUT_PROP_HAPTIC_TOUCHPAD property indicates that device:
> +- supports simple haptic auto and manual triggering
> +- can differentiate between at least 5 fingers
> +- uses correct resolution for the X/Y (units and value)
> +- reports correct force per touch, and correct units for them (newtons or grams)
> +- follows the MT protocol type B
> +
> +Summing up, such devices follow the MS spec for input devices in
> +Win8 and Win8.1, and in addition support the Simple haptic controller HID table,
> +and report correct units for the pressure.

I'm a bit late to the party here but I just had to deal with a related
bug and I'm wondering if you'd be open to loosening the definition of
INPUT_PROP_HAPTIC_TOUCHPAD to include touchpads that are *physically*
haptic touchpads but do not support userspace control of the
haptics (lack of driver support, usually).

We currently lack support for those "pressurepads" - in theory they
should report pressure resolution but the number of quirks we ship in
libinput indicates none or few of them do. Those devices *should*
report HID 0x0D usage 0x55 and identify them as pressurepads [1] because
otherwise Windows probably wouldn't work (unfortunately I don't have
access to any of those devices to verify).

By using this prop for all pressurepads including those not exposing
actual haptic effects the definition would become:

INPUT_PROP_HAPTIC_TOUCHPAD
--------------------------

The INPUT_PROP_HAPTIC_TOUCHPAD property indicates that device:
- can differentiate between at least 5 fingers
- uses correct resolution for the X/Y (units and value)
- follows the MT protocol type B
- may support simple haptic auto and manual triggering and if so:
  - reports correct force per touch, and correct units for them (newtons or grams)

And then we can hook up the 0x55 usage to set that property and leave it
up to the client to check if the FF_ bits are in place to verify it's a
haptic-haptic touchpad?

This would save us from needing a separate INPUT_PROP_PRESSUREPAD.

Cheers,
  Peter

[1] https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/touchpad-windows-precision-touchpad-collection#device-capabilities-feature-report


> +
>  Guidelines
>  ==========
>  
> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> index 3b2524e4b667d1e7cc02ff5cb674e7c2ac069a66..efe8c36d4ee9a938ffb1b0dd0ddd0ec6a3fcb8fe 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -27,6 +27,7 @@
>  #define INPUT_PROP_TOPBUTTONPAD		0x04	/* softbuttons at top of pad */
>  #define INPUT_PROP_POINTING_STICK	0x05	/* is a pointing stick */
>  #define INPUT_PROP_ACCELEROMETER	0x06	/* has accelerometer */
> +#define INPUT_PROP_HAPTIC_TOUCHPAD	0x07	/* is a haptic touchpad */
>  
>  #define INPUT_PROP_MAX			0x1f
>  #define INPUT_PROP_CNT			(INPUT_PROP_MAX + 1)
> 
> -- 
> 2.51.0.rc1.193.gad69d77794-goog
> 
> 

  parent reply	other threads:[~2025-10-24  3:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 23:08 [PATCH v3 00/11] HID: Implement haptic touchpad support Jonathan Denose
2025-08-18 23:08 ` [PATCH v3 01/11] HID: add haptics page defines Jonathan Denose
2025-08-18 23:08 ` [PATCH v3 02/11] Input: add FF_HAPTIC effect type Jonathan Denose
2025-09-14  1:02   ` Dmitry Torokhov
2025-08-18 23:08 ` [PATCH v3 03/11] Input: add INPUT_PROP_HAPTIC_TOUCHPAD Jonathan Denose
2025-08-19  4:19   ` Randy Dunlap
2025-09-14  1:03   ` Dmitry Torokhov
2025-10-24  3:30   ` Peter Hutterer [this message]
2025-08-18 23:08 ` [PATCH v3 04/11] HID: haptic: introduce hid_haptic_device Jonathan Denose
2025-10-09 14:43   ` Thorsten Leemhuis
2025-10-10  4:50     ` Randy Dunlap
2025-10-10  6:48       ` Thorsten Leemhuis
2025-10-10 18:55         ` Randy Dunlap
2025-10-10 20:30           ` Jonathan Denose
2025-10-10 21:09             ` Lucas GISSOT
2025-10-10 22:51             ` Randy Dunlap
2025-10-13 13:19               ` Jonathan Denose
2025-10-13 14:29                 ` Benjamin Tissoires
2025-10-13 20:59                   ` Jonathan Denose
2025-08-18 23:08 ` [PATCH v3 05/11] HID: input: allow mapping of haptic output Jonathan Denose
2025-08-18 23:08 ` [PATCH v3 06/11] HID: haptic: initialize haptic device Jonathan Denose
2025-08-18 23:08 ` [PATCH v3 07/11] HID: input: calculate resolution for pressure Jonathan Denose
2025-08-18 23:08 ` [PATCH v3 08/11] HID: haptic: add functions handling events Jonathan Denose
2025-08-18 23:08 ` [PATCH v3 09/11] Input: MT - add INPUT_MT_TOTAL_FORCE flags Jonathan Denose
2025-09-14  1:04   ` Dmitry Torokhov
2025-08-18 23:08 ` [PATCH v3 10/11] HID: haptic: add hid_haptic_switch_mode Jonathan Denose
2025-08-18 23:08 ` [PATCH v3 11/11] HID: multitouch: add haptic multitouch support Jonathan Denose
2025-09-02 21:30 ` [PATCH v3 00/11] HID: Implement haptic touchpad support Jonathan Denose
2025-09-04 10:02   ` Benjamin Tissoires
2025-09-12 15:28     ` Jiri Kosina
2025-09-14  1:05       ` Dmitry Torokhov
2025-09-15 13:41 ` Benjamin Tissoires

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=20251024033045.GA48918@quokka \
    --to=peter.hutterer@who-t.net \
    --cc=aczubak@google.com \
    --cc=bentiss@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jdenose@google.com \
    --cc=jikos@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rydberg@bitmath.org \
    --cc=seobrien@google.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).