Documentation: input: expand INPUT_PROP_HAPTIC_TOUCHPAD to all pressure pads
Subsystems (3)
PATCH 1/1 Documentation: input: expand INPUT_PROP_HAPTIC_TOUCHPAD to all pressure pads
Definition: "pressure pad" used here as 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 that definition to include all haptic touchpads (pressure pads) 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_HAPTIC_TOUCHPAD
- pressurepad with haptics:
INPUT_PROP_BUTTONPAD + INPUT_PROP_HAPTIC_TOUCHPAD + FF_HAPTIC
---
Original patch series: https://lore.kernel.org/linux-input/20251024033045.GA48918@quokka/T/#m20ec992705f449f9d9758e0080622cfae1c90660
See my comment there: https://lore.kernel.org/linux-input/20251024033045.GA48918@quokka/T/#u
My motivation is that we need something to identify pressurepads that do not expose actual haptic feedback configuration. Right now we're adding quirks for each device in libinput but that doesn't scale and HID defines Usage Page 0x0D Usage 0x55 [1] to tell us whether the form factor is a pressurepad, we're just not using it (yet).
I don't think adding a separate INPUT_PROP_PRESSUREPAD is the right thing to do - HAPTIC_TOUCHPAD is good enough since presence of the FF_HAPTICS bit indicates that it is controllable.
Documentation/input/event-codes.rst | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
Documentation/input/event-codes.rst +14 -5
@@ -403,16 +403,25 @@ 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 +The INPUT_PROP_HAPTIC_TOUCHPAD property indicates that the device provides +simulated haptic feedback (e.g. a vibrator motor situated below the surface) +instead of physical haptic feedback (e.g. a hinge). This property is only set +if the device: - 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 +If the simulated haptic feedback is controllable by userspace the device must: +- support simple haptic auto and manual triggering, and +- report correct force per touch, and correct units for them (newtons or grams), and +- provide the EV_FF FF_HAPTIC force feedback effect. + 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. +Win8 and Win8.1, and in addition may support the Simple haptic controller HID +table, and report correct units for the pressure. + +Where applicable, this property is set in addition to INPUT_PROP_BUTTONPAD, it +does not replace that property. Guidelines ==========
Signature · 1 line
2.51.0
Hi,
Quoted 58 lines · Peter Hutterer
Definition: "pressure pad" used here as 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 onABS_MT_PRESSUREhas been in the docs since commit20ccc8dd38a3("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: addINPUT_PROP_HAPTIC_TOUCHPAD") introducesINPUT_PROP_HAPTIC_TOUCHPADbut restricted it to those touchpads that have support for userspace-controlled effects. Let's expand that definition to include all haptic touchpads (pressure pads) since those that do support FF effects can be identified by the presence of theFF_HAPTICbit.This means:
- clickpad:INPUT_PROP_BUTTONPAD
- pressurepad:INPUT_PROP_BUTTONPAD+INPUT_PROP_HAPTIC_TOUCHPAD
- pressurepad with haptics:
INPUT_PROP_BUTTONPAD+INPUT_PROP_HAPTIC_TOUCHPAD+FF_HAPTICSigned-off-by Peter Hutterer <[email protected]>---
Original patch series: https://lore.kernel.org/linux-input/20251024033045.GA48918@quokka/T/#m20ec992705f449f9d9758e0080622cfae1c90660
See my comment there: https://lore.kernel.org/linux-input/20251024033045.GA48918@quokka/T/#uMy motivation is that we need something to identify pressurepads that do not expose actual haptic feedback configuration. Right now we're adding quirks for each device in libinput but that doesn't scale and HID defines Usage Page
0x0DUsage0x55[1] to tell us whether the form factor is a pressurepad, we're just not using it (yet).I don't think adding a separate
INPUT_PROP_PRESSUREPADis the right thing to do -HAPTIC_TOUCHPADis good enough since presence of theFF_HAPTICSbit indicates that it is controllable.Documentation/input/event-codes.rst | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)Documentation/input/event-codes.rst +0
-0@@ -403,16 +403,25 @@ regular directional axes and accelerometer axes on the same event node. INPUT_PROP_HAPTIC_TOUCHPAD --------------------------
Documentation/input/event-codes.rst regular directional axes and accelerometer axes on the same event node. · line 412
Quoted 10 lines
Documentation/input/event-codes.rst +4
-3-The INPUT_PROP_HAPTIC_TOUCHPAD property indicates that device: -- supports simple haptic auto and manual triggering +The INPUT_PROP_HAPTIC_TOUCHPAD property indicates that the device provides +simulated haptic feedback (e.g. a vibrator motor situated below the surface) +instead of physical haptic feedback (e.g. a hinge). This property is only set +if the device: - 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
Looks reasonable to me. But the list above and the one below are not rendered as lists in html. It would be nice to convert them to lists.
Quoted 17 lines
Documentation/input/event-codes.rst +10
-2+If the simulated haptic feedback is controllable by userspace the device must: +- support simple haptic auto and manual triggering, and +- report correct force per touch, and correct units for them (newtons or grams), and +- provide the EV_FF FF_HAPTIC force feedback effect. + 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. +Win8 and Win8.1, and in addition may support the Simple haptic controller HID +table, and report correct units for the pressure. + +Where applicable, this property is set in addition to INPUT_PROP_BUTTONPAD, it +does not replace that property. Guidelines ==========
Signature · 1 line
~Randy
PATCH v2 1/1 Documentation: input: expand INPUT_PROP_HAPTIC_TOUCHPAD to all pressure pads
In reply to Peter HuttererDefinition: "pressure pad" used here as 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 that definition to include all haptic touchpads (pressure pads) 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_HAPTIC_TOUCHPAD
- pressurepad with haptics:
INPUT_PROP_BUTTONPAD + INPUT_PROP_HAPTIC_TOUCHPAD + FF_HAPTIC
---
Changes to v1: extra empty lines to render the lists as lists
Link to v1: https://lore.kernel.org/linux-input/20251030011735.GA969565@quokka/T/#u
Side-note: typo in my v1 comment, the HID usage ID that tells us whether it's a clickpad or pressurepad is 0x59, not 0x55.
Documentation/input/event-codes.rst | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-)
Documentation/input/event-codes.rst +16 -5
@@ -403,16 +403,27 @@ 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 +The INPUT_PROP_HAPTIC_TOUCHPAD property indicates that the device provides +simulated haptic feedback (e.g. a vibrator motor situated below the surface) +instead of physical haptic feedback (e.g. a hinge). This property is only set +if the device: + - 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 +If the simulated haptic feedback is controllable by userspace the device must: + +- support simple haptic auto and manual triggering, and +- report correct force per touch, and correct units for them (newtons or grams), and +- provide the EV_FF FF_HAPTIC force feedback effect. + 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. +Win8 and Win8.1, and in addition may support the Simple haptic controller HID +table, and report correct units for the pressure. + +Where applicable, this property is set in addition to INPUT_PROP_BUTTONPAD, it +does not replace that property. Guidelines ==========
Signature · 1 line
2.51.0
Dmitry Torokhov
maintainerHi Peter,
Quoted 22 lines · Peter Hutterer
Definition: "pressure pad" used here as 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 onABS_MT_PRESSUREhas been in the docs since commit20ccc8dd38a3("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: addINPUT_PROP_HAPTIC_TOUCHPAD") introducesINPUT_PROP_HAPTIC_TOUCHPADbut restricted it to those touchpads that have support for userspace-controlled effects. Let's expand that definition to include all haptic touchpads (pressure pads) since those that do support FF effects can be identified by the presence of theFF_HAPTICbit.
Quoted 5 lines
This means:
- clickpad:INPUT_PROP_BUTTONPAD
- pressurepad:INPUT_PROP_BUTTONPAD+INPUT_PROP_HAPTIC_TOUCHPAD
- pressurepad with haptics:
INPUT_PROP_BUTTONPAD+INPUT_PROP_HAPTIC_TOUCHPAD+FF_HAPTIC
Should we maybe rename it to INPUT_PROP_PRESSURE_TOUCHPAD? We are within a release of introducing it, so we should be able to rename it without much fallout.
Thanks.
Signature · 1 line
Dmitry
Quoted 31 lines · Dmitry Torokhov
Hi Peter,
Quoted 22 lines · Peter Hutterer
Definition: "pressure pad" used here as 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 onABS_MT_PRESSUREhas been in the docs since commit20ccc8dd38a3("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: addINPUT_PROP_HAPTIC_TOUCHPAD") introducesINPUT_PROP_HAPTIC_TOUCHPADbut restricted it to those touchpads that have support for userspace-controlled effects. Let's expand that definition to include all haptic touchpads (pressure pads) since those that do support FF effects can be identified by the presence of theFF_HAPTICbit.Quoted 5 lines
This means:
- clickpad:INPUT_PROP_BUTTONPAD
- pressurepad:INPUT_PROP_BUTTONPAD+INPUT_PROP_HAPTIC_TOUCHPAD
- pressurepad with haptics:
INPUT_PROP_BUTTONPAD+INPUT_PROP_HAPTIC_TOUCHPAD+FF_HAPTIC
Quoted 3 lines
Should we maybe rename it to
INPUT_PROP_PRESSURE_TOUCHPAD? We are within a release of introducing it, so we should be able to rename it without much fallout.
I'd be happy with a rename too. Want me to send a patch for that or do you want to rename it locally during applying?
Cheers,
Peter
Dmitry Torokhov
maintainerQuoted 32 lines · Peter Hutterer
Quoted 31 lines · Dmitry Torokhov
Hi Peter,
Quoted 27 lines · Peter Hutterer
Definition: "pressure pad" used here as 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 onABS_MT_PRESSUREhas been in the docs since commit20ccc8dd38a3("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: addINPUT_PROP_HAPTIC_TOUCHPAD") introducesINPUT_PROP_HAPTIC_TOUCHPADbut restricted it to those touchpads that have support for userspace-controlled effects. Let's expand that definition to include all haptic touchpads (pressure pads) since those that do support FF effects can be identified by the presence of theFF_HAPTICbit.This means:
- clickpad:INPUT_PROP_BUTTONPAD
- pressurepad:INPUT_PROP_BUTTONPAD+INPUT_PROP_HAPTIC_TOUCHPAD
- pressurepad with haptics:
INPUT_PROP_BUTTONPAD+INPUT_PROP_HAPTIC_TOUCHPAD+FF_HAPTIC
Quoted 6 lines
Quoted 3 lines
Should we maybe rename it to
INPUT_PROP_PRESSURE_TOUCHPAD? We are within a release of introducing it, so we should be able to rename it without much fallout.I'd be happy with a rename too. Want me to send a patch for that or do you want to rename it locally during applying?
Please send the updated patch for input.h along with updated documentation.
Thanks.
Signature · 1 line
Dmitry
PATCH v3 1/1 Input: rename INPUT_PROP_HAPTIC_TOUCHPAD to INPUT_PROP_PRESSUREPAD
In reply to Peter HuttererAnd 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
---
ftr, I picked PRESSUREPAD over Dmitry's PRESSURE_TOUCHPAD suggestion because it matches better with the existing BUTTONPAD.
Changes to v1: extra empty lines to render the lists as lists Changes to v2: rename to PRESSUREPAD and rename it in the instances
where it's used in the code
v1: https://lore.kernel.org/linux-input/20251030011735.GA969565@quokka/T/#u
v2: https://lore.kernel.org/linux-input/20251030011735.GA969565@quokka/T/#m9504de27b02d00a55d540fd9fec9aed3edd0133c
Documentation/input/event-codes.rst | 25 ++++++++++++++++++------- drivers/hid/hid-haptic.c | 2 +- include/uapi/linux/input-event-codes.h | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-)
Documentation/input/event-codes.rst +18 -7
@@ -400,19 +400,30 @@ 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 --------------------------- +INPUT_PROP_PRESSUREPAD +---------------------- + +The INPUT_PROP_PRESSUREPAD property indicates that the device provides +simulated haptic feedback (e.g. a vibrator motor situated below the surface) +instead of physical haptic feedback (e.g. a hinge). This property is only set +if the device: -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 +If the simulated haptic feedback is controllable by userspace the device must: + +- support simple haptic auto and manual triggering, and +- report correct force per touch, and correct units for them (newtons or grams), and +- provide the EV_FF FF_HAPTIC force feedback effect. + 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. +Win8 and Win8.1, and in addition may support the Simple haptic controller HID +table, and report correct units for the pressure. + +Where applicable, this property is set in addition to INPUT_PROP_BUTTONPAD, it +does not replace that property. Guidelines ==========
drivers/hid/hid-haptic.c +1 -1
@@ -86,7 +86,7 @@ int hid_haptic_input_configured(struct hid_device *hdev,if (hi->application ==HID_DG_TOUCHPAD ) {if (haptic->auto_trigger_report && haptic->manual_trigger_report) { -__set_bit (INPUT_PROP_HAPTIC_TOUCHPAD , hi->input->propbit); +__set_bit (INPUT_PROP_PRESSUREPAD , hi->input->propbit);return 1 ; }return 0 ;
include/uapi/linux/input-event-codes.h +1 -1
@@ -27,7 +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_PRESSUREPAD 0x07/* pressure triggers clicks */ #define INPUT_PROP_MAX 0x1f#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)
Signature · 1 line
2.51.1
Re: [PATCH v3] Input: rename INPUT_PROP_HAPTIC_TOUCHPAD to INPUT_PROP_PRESSUREPAD
Quoted 25 lines · Peter Hutterer
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 onABS_MT_PRESSUREhas been in the docs since commit20ccc8dd38a3("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: addINPUT_PROP_HAPTIC_TOUCHPAD") introducesINPUT_PROP_HAPTIC_TOUCHPADbut 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 theFF_HAPTICbit.
Quoted 7 lines
This means:
- clickpad:INPUT_PROP_BUTTONPAD
- pressurepad:INPUT_PROP_BUTTONPAD+INPUT_PROP_PRESSUREPAD
- pressurepad with configurable haptics:
INPUT_PROP_BUTTONPAD+INPUT_PROP_PRESSUREPAD+FF_HAPTICSigned-off-by Peter Hutterer <[email protected]>
Unless Jiri has any problem with it, I guess this would be fine going through your tree Dmitry.
Cheers,
Benjamin
Quoted 87 lines
---
ftr, I picked PRESSUREPAD over Dmitry'sPRESSURE_TOUCHPADsuggestion because it matches better with the existing BUTTONPAD.Changes to v1: extra empty lines to render the lists as lists Changes to v2: rename to PRESSUREPAD and rename it in the instances
where it's used in the codev1: https://lore.kernel.org/linux-input/20251030011735.GA969565@quokka/T/#u
v2: https://lore.kernel.org/linux-input/20251030011735.GA969565@quokka/T/#m9504de27b02d00a55d540fd9fec9aed3edd0133cDocumentation/input/event-codes.rst | 25 ++++++++++++++++++------- drivers/hid/hid-haptic.c | 2 +- include/uapi/linux/input-event-codes.h | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-)Documentation/input/event-codes.rst +18
-7@@ -400,19 +400,30 @@ 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 --------------------------- +INPUT_PROP_PRESSUREPAD +---------------------- + +The INPUT_PROP_PRESSUREPAD property indicates that the device provides +simulated haptic feedback (e.g. a vibrator motor situated below the surface) +instead of physical haptic feedback (e.g. a hinge). This property is only set +if the device: -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 +If the simulated haptic feedback is controllable by userspace the device must: + +- support simple haptic auto and manual triggering, and +- report correct force per touch, and correct units for them (newtons or grams), and +- provide the EV_FF FF_HAPTIC force feedback effect. + 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. +Win8 and Win8.1, and in addition may support the Simple haptic controller HID +table, and report correct units for the pressure. + +Where applicable, this property is set in addition to INPUT_PROP_BUTTONPAD, it +does not replace that property. Guidelines ==========drivers/hid/hid-haptic.c +1
-1@@ -86,7 +86,7 @@ int hid_haptic_input_configured(struct hid_device *hdev,if (hi->application ==HID_DG_TOUCHPAD ) {if (haptic->auto_trigger_report && haptic->manual_trigger_report) { -__set_bit (INPUT_PROP_HAPTIC_TOUCHPAD , hi->input->propbit); +__set_bit (INPUT_PROP_PRESSUREPAD , hi->input->propbit);return 1 ; }return 0 ;include/uapi/linux/input-event-codes.h +1
-1@@ -27,7 +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_PRESSUREPAD 0x07/* pressure triggers clicks */ #define INPUT_PROP_MAX 0x1f#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)Signature · 1 line
2.51.1
Re: [PATCH v3] Input: rename INPUT_PROP_HAPTIC_TOUCHPAD to INPUT_PROP_PRESSUREPAD
Dmitry - gentle ping?
Cheers,
Peter
Quoted 130 lines · Benjamin Tissoires
Quoted 25 lines · Peter Hutterer
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 onABS_MT_PRESSUREhas been in the docs since commit20ccc8dd38a3("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: addINPUT_PROP_HAPTIC_TOUCHPAD") introducesINPUT_PROP_HAPTIC_TOUCHPADbut 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 theFF_HAPTICbit.Quoted 7 lines
This means:
- clickpad:INPUT_PROP_BUTTONPAD
- pressurepad:INPUT_PROP_BUTTONPAD+INPUT_PROP_PRESSUREPAD
- pressurepad with configurable haptics:
INPUT_PROP_BUTTONPAD+INPUT_PROP_PRESSUREPAD+FF_HAPTICSigned-off-by Peter Hutterer <[email protected]>Unless Jiri has any problem with it, I guess this would be fine going through your tree Dmitry.
Cheers,
BenjaminQuoted 87 lines
---
ftr, I picked PRESSUREPAD over Dmitry'sPRESSURE_TOUCHPADsuggestion because it matches better with the existing BUTTONPAD.Changes to v1: extra empty lines to render the lists as lists Changes to v2: rename to PRESSUREPAD and rename it in the instances
where it's used in the codev1: https://lore.kernel.org/linux-input/20251030011735.GA969565@quokka/T/#u
v2: https://lore.kernel.org/linux-input/20251030011735.GA969565@quokka/T/#m9504de27b02d00a55d540fd9fec9aed3edd0133cDocumentation/input/event-codes.rst | 25 ++++++++++++++++++------- drivers/hid/hid-haptic.c | 2 +- include/uapi/linux/input-event-codes.h | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-)Documentation/input/event-codes.rst +18
-7@@ -400,19 +400,30 @@ 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 --------------------------- +INPUT_PROP_PRESSUREPAD +---------------------- + +The INPUT_PROP_PRESSUREPAD property indicates that the device provides +simulated haptic feedback (e.g. a vibrator motor situated below the surface) +instead of physical haptic feedback (e.g. a hinge). This property is only set +if the device: -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 +If the simulated haptic feedback is controllable by userspace the device must: + +- support simple haptic auto and manual triggering, and +- report correct force per touch, and correct units for them (newtons or grams), and +- provide the EV_FF FF_HAPTIC force feedback effect. + 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. +Win8 and Win8.1, and in addition may support the Simple haptic controller HID +table, and report correct units for the pressure. + +Where applicable, this property is set in addition to INPUT_PROP_BUTTONPAD, it +does not replace that property. Guidelines ==========drivers/hid/hid-haptic.c +1
-1@@ -86,7 +86,7 @@ int hid_haptic_input_configured(struct hid_device *hdev,if (hi->application ==HID_DG_TOUCHPAD ) {if (haptic->auto_trigger_report && haptic->manual_trigger_report) { -__set_bit (INPUT_PROP_HAPTIC_TOUCHPAD , hi->input->propbit); +__set_bit (INPUT_PROP_PRESSUREPAD , hi->input->propbit);return 1 ; }return 0 ;include/uapi/linux/input-event-codes.h +1
-1@@ -27,7 +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_PRESSUREPAD 0x07/* pressure triggers clicks */ #define INPUT_PROP_MAX 0x1f#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)Signature · 1 line
2.51.1
Re: [PATCH v3] Input: rename INPUT_PROP_HAPTIC_TOUCHPAD to INPUT_PROP_PRESSUREPAD
In reply to Peter HuttererQuoted 25 lines · Peter Hutterer
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 onABS_MT_PRESSUREhas been in the docs since commit20ccc8dd38a3("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: addINPUT_PROP_HAPTIC_TOUCHPAD") introducesINPUT_PROP_HAPTIC_TOUCHPADbut 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 theFF_HAPTICbit.
Quoted 7 lines
This means:
- clickpad:INPUT_PROP_BUTTONPAD
- pressurepad:INPUT_PROP_BUTTONPAD+INPUT_PROP_PRESSUREPAD
- pressurepad with configurable haptics:
INPUT_PROP_BUTTONPAD+INPUT_PROP_PRESSUREPAD+FF_HAPTICSigned-off-by Peter Hutterer <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry
Re: [PATCH v3] Input: rename INPUT_PROP_HAPTIC_TOUCHPAD to INPUT_PROP_PRESSUREPAD
In reply to Peter HuttererHi,
Quoted 108 lines · Peter Hutterer
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 onABS_MT_PRESSUREhas been in the docs since commit20ccc8dd38a3("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: addINPUT_PROP_HAPTIC_TOUCHPAD") introducesINPUT_PROP_HAPTIC_TOUCHPADbut 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 theFF_HAPTICbit.This means:
- clickpad:INPUT_PROP_BUTTONPAD
- pressurepad:INPUT_PROP_BUTTONPAD+INPUT_PROP_PRESSUREPAD
- pressurepad with configurable haptics:
INPUT_PROP_BUTTONPAD+INPUT_PROP_PRESSUREPAD+FF_HAPTICSigned-off-by Peter Hutterer <[email protected]>---
ftr, I picked PRESSUREPAD over Dmitry'sPRESSURE_TOUCHPADsuggestion because it matches better with the existing BUTTONPAD.Changes to v1: extra empty lines to render the lists as lists Changes to v2: rename to PRESSUREPAD and rename it in the instances
where it's used in the codev1: https://lore.kernel.org/linux-input/20251030011735.GA969565@quokka/T/#u
v2: https://lore.kernel.org/linux-input/20251030011735.GA969565@quokka/T/#m9504de27b02d00a55d540fd9fec9aed3edd0133cDocumentation/input/event-codes.rst | 25 ++++++++++++++++++------- drivers/hid/hid-haptic.c | 2 +- include/uapi/linux/input-event-codes.h | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-)Documentation/input/event-codes.rst +18
-7@@ -400,19 +400,30 @@ 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 --------------------------- +INPUT_PROP_PRESSUREPAD +---------------------- + +The INPUT_PROP_PRESSUREPAD property indicates that the device provides +simulated haptic feedback (e.g. a vibrator motor situated below the surface) +instead of physical haptic feedback (e.g. a hinge). This property is only set +if the device: -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 +If the simulated haptic feedback is controllable by userspace the device must: + +- support simple haptic auto and manual triggering, and +- report correct force per touch, and correct units for them (newtons or grams), and +- provide the EV_FF FF_HAPTIC force feedback effect. + 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. +Win8 and Win8.1, and in addition may support the Simple haptic controller HID +table, and report correct units for the pressure. + +Where applicable, this property is set in addition to INPUT_PROP_BUTTONPAD, it +does not replace that property. Guidelines ==========drivers/hid/hid-haptic.c +1
-1@@ -86,7 +86,7 @@ int hid_haptic_input_configured(struct hid_device *hdev,if (hi->application ==HID_DG_TOUCHPAD ) {if (haptic->auto_trigger_report && haptic->manual_trigger_report) { -__set_bit (INPUT_PROP_HAPTIC_TOUCHPAD , hi->input->propbit); +__set_bit (INPUT_PROP_PRESSUREPAD , hi->input->propbit);return 1 ; }return 0 ;include/uapi/linux/input-event-codes.h +0
-0
include/uapi/linux/input-event-codes.h line 33
Quoted 8 lines
include/uapi/linux/input-event-codes.h +1
-1@@ -27,7 +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_PRESSUREPAD 0x07/* pressure triggers clicks */ #define INPUT_PROP_MAX 0x1f#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)
When you rename UAPI constants, please don't forget to retain old names, otherwise there is a high chance you'll break userspace. This time you've broken the build of strace.
Signature · 1 line
ldv
Jiri Kosina
maintainerRe: [PATCH v3] Input: rename INPUT_PROP_HAPTIC_TOUCHPAD to INPUT_PROP_PRESSUREPAD
Quoted 11 lines · Dmitry V. Levin
Quoted 11 lines
include/uapi/linux/input-event-codes.h +1
-1@@ -27,7 +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_PRESSUREPAD 0x07/* pressure triggers clicks */
Quoted 6 lines
include/uapi/linux/input-event-codes.h line 33
Quoted 2 lines
include/uapi/linux/input-event-codes.h +0
-0#define INPUT_PROP_MAX 0x1f#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)When you rename UAPI constants, please don't forget to retain old names, otherwise there is a high chance you'll break userspace. This time you've broken the build of strace.
In general I'd agree, but in this particular case, both commits happened within the development window (6.18-rc1 vs 6.18-rc7).
"No breaking of userspace" is certainly a hard (and good) rule between actual existing version releases, but I hope we're not expected to adhere to it in between -rcs during a development cycle.
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs