summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-02-09 10:37:42 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-02-10 08:08:31 +1000
commit1f304763b471f239817fab1350eaf6be0c99babd (patch)
tree26510e72017040c3049bf6f9c35844c4cfa4e453
parentc9abcb2e1ccd1b056fedeca17687f7e49b72b8b7 (diff)
downloadlibinput-1f304763b471f239817fab1350eaf6be0c99babd.tar.gz
udev: fix ALPS firmware detection
The firmware version is in id.version, not id.model which is always PSMOUSE_ALPS for ALPS devices. The various fw versions are listed in <kernel>/drivers/input/mouse/alps.h and are all hex numbers. Version 8 is actually 0x800, change the match accordingly. Expected side-effect: earlier versions of ALPS touchpads now lose their (erroneous) size assignment. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--udev/90-libinput-model-quirks.hwdb4
-rw-r--r--udev/libinput-model-quirks.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/udev/90-libinput-model-quirks.hwdb b/udev/90-libinput-model-quirks.hwdb
index f23a7f95..6225da11 100644
--- a/udev/90-libinput-model-quirks.hwdb
+++ b/udev/90-libinput-model-quirks.hwdb
@@ -22,8 +22,8 @@ libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:dmi:*
libinput:name:*AlpsPS/2 ALPS GlidePoint:dmi:*
LIBINPUT_MODEL_ALPS_TOUCHPAD=1
-libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:8
-libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:8
+libinput:name:*AlpsPS/2 ALPS DualPoint TouchPad:fwversion:800
+libinput:name:*AlpsPS/2 ALPS GlidePoint:fwversion:800
LIBINPUT_ATTR_SIZE_HINT=100x55
##########################################
diff --git a/udev/libinput-model-quirks.c b/udev/libinput-model-quirks.c
index 67115fae..c8baae79 100644
--- a/udev/libinput-model-quirks.c
+++ b/udev/libinput-model-quirks.c
@@ -63,9 +63,9 @@ handle_touchpad_alps(struct udev_device *device)
if (sscanf(product, "%x/%x/%x/%x", &bus, &vid, &pid, &version) != 4)
return;
- /* ALPS' firmware version is the PID */
+ /* ALPS' firmware version is the version */
if (pid)
- printf("LIBINPUT_MODEL_FIRMWARE_VERSION=%d\n", pid);
+ printf("LIBINPUT_MODEL_FIRMWARE_VERSION=%x\n", version);
}
static void