Date: Sun, 12 Apr 2026 18:10:14 +0000 From: Vladimir Kondratyev <wulf@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: dc5a94962e21 - main - wsp(4): Do not handle pressure on non-ForceTouch devices Message-ID: <69dbe006.377fb.51b61ee6@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=dc5a94962e21a267550a2c20a0c4707d06843942 commit dc5a94962e21a267550a2c20a0c4707d06843942 Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2026-04-12 18:09:23 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2026-04-12 18:09:23 +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 --- 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);home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69dbe006.377fb.51b61ee6>
