Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Input: rename INPUT_PROP_HAPTIC_TOUCHPAD to INPUT_PROP_PRESSUREPAD

And expand it to encompass all pressure pads.

Definition: "pressure pad" as used here as includes all touchpads that
use physical pressure to convert to click, without physical hinges. Also
called haptic touchpads in general parlance, Synaptics calls them
ForcePads.

Most (all?) pressure pads are currently advertised as
INPUT_PROP_BUTTONPAD. The suggestion to identify them as pressure pads
by defining the resolution on ABS_MT_PRESSURE has been in the docs since
commit 20ccc8dd38a3 ("Documentation: input: define
ABS_PRESSURE/ABS_MT_PRESSURE resolution as grams") but few devices
provide this information.

In userspace it's thus impossible to determine whether a device is a
true pressure pad (pressure equals pressure) or a normal clickpad with
(pressure equals finger size).

Commit 7075ae4ac9db ("Input: add INPUT_PROP_HAPTIC_TOUCHPAD") introduces
INPUT_PROP_HAPTIC_TOUCHPAD but restricted it to those touchpads that
have support for userspace-controlled effects. Let's expand and rename
that definition to include all pressure pad touchpads since those that
do support FF effects can be identified by the presence of the
FF_HAPTIC bit.

This means:
- clickpad: INPUT_PROP_BUTTONPAD
- pressurepad: INPUT_PROP_BUTTONPAD + INPUT_PROP_PRESSUREPAD
- pressurepad with configurable haptics:
INPUT_PROP_BUTTONPAD + INPUT_PROP_PRESSUREPAD + FF_HAPTIC

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Link: https://patch.msgid.link/20251106114534.GA405512@tassie
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Peter Hutterer and committed by
Dmitry Torokhov
ae8966b7 f39b6c46

+20 -9
+18 -7
Documentation/input/event-codes.rst
··· 400 400 All other axes retain their meaning. A device must not mix 401 401 regular directional axes and accelerometer axes on the same event node. 402 402 403 - INPUT_PROP_HAPTIC_TOUCHPAD 404 - -------------------------- 403 + INPUT_PROP_PRESSUREPAD 404 + ---------------------- 405 405 406 - The INPUT_PROP_HAPTIC_TOUCHPAD property indicates that device: 407 - - supports simple haptic auto and manual triggering 406 + The INPUT_PROP_PRESSUREPAD property indicates that the device provides 407 + simulated haptic feedback (e.g. a vibrator motor situated below the surface) 408 + instead of physical haptic feedback (e.g. a hinge). This property is only set 409 + if the device: 410 + 408 411 - can differentiate between at least 5 fingers 409 412 - uses correct resolution for the X/Y (units and value) 410 - - reports correct force per touch, and correct units for them (newtons or grams) 411 413 - follows the MT protocol type B 412 414 415 + If the simulated haptic feedback is controllable by userspace the device must: 416 + 417 + - support simple haptic auto and manual triggering, and 418 + - report correct force per touch, and correct units for them (newtons or grams), and 419 + - provide the EV_FF FF_HAPTIC force feedback effect. 420 + 413 421 Summing up, such devices follow the MS spec for input devices in 414 - Win8 and Win8.1, and in addition support the Simple haptic controller HID table, 415 - and report correct units for the pressure. 422 + Win8 and Win8.1, and in addition may support the Simple haptic controller HID 423 + table, and report correct units for the pressure. 424 + 425 + Where applicable, this property is set in addition to INPUT_PROP_BUTTONPAD, it 426 + does not replace that property. 416 427 417 428 Guidelines 418 429 ==========
+1 -1
drivers/hid/hid-haptic.c
··· 86 86 if (hi->application == HID_DG_TOUCHPAD) { 87 87 if (haptic->auto_trigger_report && 88 88 haptic->manual_trigger_report) { 89 - __set_bit(INPUT_PROP_HAPTIC_TOUCHPAD, hi->input->propbit); 89 + __set_bit(INPUT_PROP_PRESSUREPAD, hi->input->propbit); 90 90 return 1; 91 91 } 92 92 return 0;
+1 -1
include/uapi/linux/input-event-codes.h
··· 27 27 #define INPUT_PROP_TOPBUTTONPAD 0x04 /* softbuttons at top of pad */ 28 28 #define INPUT_PROP_POINTING_STICK 0x05 /* is a pointing stick */ 29 29 #define INPUT_PROP_ACCELEROMETER 0x06 /* has accelerometer */ 30 - #define INPUT_PROP_HAPTIC_TOUCHPAD 0x07 /* is a haptic touchpad */ 30 + #define INPUT_PROP_PRESSUREPAD 0x07 /* pressure triggers clicks */ 31 31 32 32 #define INPUT_PROP_MAX 0x1f 33 33 #define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)