summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-02-09 10:43:45 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-02-10 08:22:02 +1000
commite013b7fef83588845cb3102a5950ac32881e1f72 (patch)
tree23f3264757629ca62ab61b77a0bfe04a893cf29e
parent23b506f318b8f525fcbc2734ea2f9fac6e225e64 (diff)
touchpad: init a default hysteresis for ALPS rushmore touchpads
https://bugs.freedesktop.org/show_bug.cgi?id=90590 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> (cherry picked from commit 07420eec05408e164de2db623bbbf778daad5616)
-rw-r--r--src/evdev-mt-touchpad.c3
-rw-r--r--src/evdev.c1
-rw-r--r--src/evdev.h1
-rw-r--r--udev/90-libinput-model-quirks.hwdb4
-rw-r--r--udev/libinput-model-quirks.c2
5 files changed, 9 insertions, 2 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index d0bc52d7..1f070175 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -1983,7 +1983,8 @@ tp_init_hysteresis(struct tp_dispatch *tp)
res_x = tp->device->abs.absinfo_x->resolution;
res_y = tp->device->abs.absinfo_y->resolution;
- if (tp->device->model_flags & EVDEV_MODEL_CYAPA) {
+ if (tp->device->model_flags &
+ (EVDEV_MODEL_CYAPA|EVDEV_MODEL_ALPS_RUSHMORE)) {
tp->hysteresis_margin.x = res_x/2;
tp->hysteresis_margin.y = res_y/2;
} else {
diff --git a/src/evdev.c b/src/evdev.c
index 281a2a03..0ee86f5f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1665,6 +1665,7 @@ evdev_read_model_flags(struct evdev_device *device)
{ "LIBINPUT_MODEL_APPLE_INTERNAL_KEYBOARD", EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD },
{ "LIBINPUT_MODEL_CYBORG_RAT", EVDEV_MODEL_CYBORG_RAT },
{ "LIBINPUT_MODEL_CYAPA", EVDEV_MODEL_CYAPA },
+ { "LIBINPUT_MODEL_ALPS_RUSHMORE", EVDEV_MODEL_ALPS_RUSHMORE },
{ NULL, EVDEV_MODEL_DEFAULT },
};
const struct model_map *m = model_map;
diff --git a/src/evdev.h b/src/evdev.h
index 96bf621c..64fbf102 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -111,6 +111,7 @@ enum evdev_device_model {
EVDEV_MODEL_APPLE_INTERNAL_KEYBOARD = (1 << 13),
EVDEV_MODEL_CYBORG_RAT = (1 << 14),
EVDEV_MODEL_CYAPA = (1 << 15),
+ EVDEV_MODEL_ALPS_RUSHMORE = (1 << 16),
};
struct mt_slot {
diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
index 6225da11..eb2859e2 100644
--- a/udev/90-libinput-model-quirks.hwdb
+++ b/udev/90-libinput-model-quirks.hwdb
@@ -26,6 +26,10 @@ libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:800
libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800
LIBINPUT_ATTR_SIZE_HINT=100x55
+libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:310
+libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:310
+ LIBINPUT_MODEL_ALPS_RUSHMORE=1
+
##########################################
# Apple
##########################################
diff --git a/udev/libinput-model-quirks.c b/udev/libinput-model-quirks.c
index c8baae79..2dc917d5 100644
--- a/udev/libinput-model-quirks.c
+++ b/udev/libinput-model-quirks.c
@@ -64,7 +64,7 @@ handle_touchpad_alps(struct udev_device *device)
return;
/* ALPS' firmware version is the version */
- if (pid)
+ if (version)
printf("LIBINPUT_MODEL_FIRMWARE_VERSION=%x\n", version);
}