git: cc6016af8461 - stable/15 - wsp(4): Do not handle pressure on non-ForceTouch devices
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Apr 2026 20:08:16 UTC
The branch stable/15 has been updated by wulf:
URL: https://cgit.FreeBSD.org/src/commit/?id=cc6016af846104b0ad0f4cd4f6e1d2cec9f89e5e
commit cc6016af846104b0ad0f4cd4f6e1d2cec9f89e5e
Author: Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2026-04-12 18:09:23 +0000
Commit: Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2026-04-22 19:59:04 +0000
wsp(4): Do not handle pressure on non-ForceTouch devices
They always report it value as zero breaking pressure-driven drivers
like moused(8) and xf86-input-synaptics.
MFC after: 1 week
(cherry picked from commit dc5a94962e21a267550a2c20a0c4707d06843942)
---
sys/dev/usb/input/wsp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sys/dev/usb/input/wsp.c b/sys/dev/usb/input/wsp.c
index f78d64f69c08..a78fac49491a 100644
--- a/sys/dev/usb/input/wsp.c
+++ b/sys/dev/usb/input/wsp.c
@@ -231,6 +231,7 @@ enum tp_type {
/* list of device capability bits */
#define HAS_INTEGRATED_BUTTON 1
+#define SUPPORTS_FORCETOUCH 2
/* trackpad finger data block size */
#define FSIZE_TYPE1 (14 * 2)
@@ -285,7 +286,7 @@ struct wsp_tp {
.delta = 0,
},
[TYPE4] = {
- .caps = HAS_INTEGRATED_BUTTON,
+ .caps = HAS_INTEGRATED_BUTTON | SUPPORTS_FORCETOUCH,
.button = BUTTON_TYPE4,
.offset = FINGER_TYPE4,
.fsize = FSIZE_TYPE4,
@@ -896,7 +897,8 @@ wsp_attach(device_t dev)
WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_POSITION_X, sc->sc_params->x);
WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_POSITION_Y, sc->sc_params->y);
/* finger pressure */
- WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_PRESSURE, sc->sc_params->p);
+ if ((sc->sc_params->tp->caps & SUPPORTS_FORCETOUCH) != 0)
+ WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_PRESSURE, sc->sc_params->p);
/* finger major/minor axis */
WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_TOUCH_MAJOR, sc->sc_params->w);
WSP_SUPPORT_ABS(sc->sc_evdev, ABS_MT_TOUCH_MINOR, sc->sc_params->w);