[PATCH libinput] touchpad: add LIBINPUT_MODEL_WOBBLY_TOUCHPAD for the HP 14-ac157tu

Peter Hutterer peter.hutterer at who-t.net
Wed Apr 13 23:41:11 UTC 2016


If some elantech touchpads require a hysteresis, let's use some more generic
tag for those touchpads that require correct handling of pointer wobbles.

https://bugs.freedesktop.org/show_bug.cgi?id=94897

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-mt-touchpad.c            | 3 +++
 src/evdev.c                        | 1 +
 src/evdev.h                        | 1 +
 udev/90-libinput-model-quirks.hwdb | 8 ++++++++
 4 files changed, 13 insertions(+)

diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index 0640974..a6eebd2 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -2023,6 +2023,9 @@ tp_init_hysteresis(struct tp_dispatch *tp)
 	    (tp->device->model_flags & EVDEV_MODEL_SYNAPTICS_SERIAL_TOUCHPAD))
 		goto want_hysteresis;
 
+	if (tp->device->model_flags & EVDEV_MODEL_WOBBLY_TOUCHPAD)
+		goto want_hysteresis;
+
 	tp->hysteresis_margin.x = 0;
 	tp->hysteresis_margin.y = 0;
 
diff --git a/src/evdev.c b/src/evdev.c
index 6bb8986..f0311c6 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1681,6 +1681,7 @@ evdev_read_model_flags(struct evdev_device *device)
 		{ "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA },
 		{ "LIBINPUT_MODEL_ALPS_RUSHMORE", EVDEV_MODEL_ALPS_RUSHMORE },
 		{ "LIBINPUT_MODEL_LENOVO_T450_TOUCHPAD", EVDEV_MODEL_LENOVO_T450_TOUCHPAD },
+		{ "LIBINPUT_MODEL_WOBBLY_TOUCHPAD", EVDEV_MODEL_WOBBLY_TOUCHPAD },
 		{ NULL, EVDEV_MODEL_DEFAULT },
 	};
 	const struct model_map *m = model_map;
diff --git a/src/evdev.h b/src/evdev.h
index 4a5d807..3a7693e 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -114,6 +114,7 @@ enum evdev_device_model {
 	EVDEV_MODEL_CYAPA = (1 << 15),
 	EVDEV_MODEL_ALPS_RUSHMORE = (1 << 16),
 	EVDEV_MODEL_LENOVO_T450_TOUCHPAD= (1 << 17),
+	EVDEV_MODEL_WOBBLY_TOUCHPAD = (1 << 18),
 };
 
 struct mt_slot {
diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
index d5978f7..d075417 100644
--- a/udev/90-libinput-model-quirks.hwdb
+++ b/udev/90-libinput-model-quirks.hwdb
@@ -81,6 +81,14 @@ libinput:name:Cypress APA Trackpad (cyapa):dmi:*
  LIBINPUT_MODEL_CYAPA=1
 
 ##########################################
+# HP
+##########################################
+
+# HP 14-ac157tu
+libinput:name:*ETPS/2 Elantech Touchpad*:dmi:*svnHP*pvrCNB1:*
+ LIBINPUT_MODEL_WOBBLY_TOUCHPAD=1
+
+##########################################
 # LENOVO
 ##########################################
 
-- 
2.5.5



More information about the wayland-devel mailing list