svn commit: r346455 - head/sys/dev/atkbdc
Vladimir Kondratyev
wulf at FreeBSD.org
Sat Apr 20 21:00:45 UTC 2019
Author: wulf
Date: Sat Apr 20 21:00:44 2019
New Revision: 346455
URL: https://svnweb.freebsd.org/changeset/base/346455
Log:
psm(4): Add support for 4 and 5 finger touches in synaptics driver
While 4-th and 5-th finger positions are not exported through PS/2
interface, total number of touches is reported by MT trackpads.
MFC after: 2 weeks
Modified:
head/sys/dev/atkbdc/psm.c
Modified: head/sys/dev/atkbdc/psm.c
==============================================================================
--- head/sys/dev/atkbdc/psm.c Sat Apr 20 20:29:03 2019 (r346454)
+++ head/sys/dev/atkbdc/psm.c Sat Apr 20 21:00:44 2019 (r346455)
@@ -1830,7 +1830,7 @@ psm_register_synaptics(device_t dev)
if (sc->synhw.capClickPad && sc->synhw.topButtonPad)
evdev_support_prop(evdev_a, INPUT_PROP_TOPBUTTONPAD);
evdev_support_key(evdev_a, BTN_TOUCH);
- evdev_support_nfingers(evdev_a, 3);
+ evdev_support_nfingers(evdev_a, sc->synhw.capReportsV ? 5 : 3);
psm_support_abs_bulk(evdev_a, synaptics_absinfo_st);
if (sc->synhw.capAdvancedGestures || sc->synhw.capReportsV)
psm_support_abs_bulk(evdev_a, synaptics_absinfo_mt);
@@ -3212,6 +3212,7 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb,
{
static int touchpad_buttons;
static int guest_buttons;
+ static int ew_finger_count;
static finger_t f[PSM_FINGERS];
int w, id, nfingers, ewcode, extended_buttons, clickpad_pressed;
@@ -3372,6 +3373,9 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb,
(pb->ipacket[1] & 0x01)) + 8,
.flags = PSM_FINGER_FUZZY,
};
+ break;
+ case 2:
+ ew_finger_count = pb->ipacket[1] & 0x0f;
default:
break;
}
@@ -3379,6 +3383,11 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb,
goto SYNAPTICS_END;
case 1:
+ if (sc->synhw.capReportsV && ew_finger_count > 3) {
+ nfingers = ew_finger_count;
+ break;
+ }
+ /* FALLTHROUGH */
case 0:
nfingers = w + 2;
break;
More information about the svn-src-all
mailing list