touchpad: enable clickfinger by default on chromebooks
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 23 Apr 2015 02:06:42 +0000 (12:06 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 4 May 2015 09:30:46 +0000 (19:30 +1000)
This matches the vendor default.

Board IDs pulled from modinfo chromeos_laptop, touchpad names from a bit of
googling around.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
src/evdev-mt-touchpad-buttons.c
src/evdev.c
src/evdev.h
udev/90-libinput-model-quirks.hwdb

index 7f60a53ab6452550f5a3240ac91820bdb092278b..608befea3f714b54ab738fab7f58b7f68b51f58a 100644 (file)
@@ -646,9 +646,12 @@ tp_button_config_click_get_method(struct libinput_device *device)
 static enum libinput_config_click_method
 tp_click_get_default_method(struct tp_dispatch *tp)
 {
+       struct evdev_device *device = tp->device;
+
        if (!tp->buttons.is_clickpad)
                return LIBINPUT_CONFIG_CLICK_METHOD_NONE;
-       else if (libevdev_get_id_vendor(tp->device->evdev) == VENDOR_ID_APPLE)
+       else if (libevdev_get_id_vendor(tp->device->evdev) == VENDOR_ID_APPLE ||
+               device->model == EVDEV_MODEL_CHROMEBOOK)
                return LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER;
        else
                return LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
index af36127acd4f78bb1ffee55fdee6ed908bd0a4f6..ee8dfe6ec2c875a9742f39c8337c981a551f72d7 100644 (file)
@@ -1447,6 +1447,7 @@ evdev_read_model(struct evdev_device *device)
                enum evdev_device_model model;
        } model_map[] = {
                { "LIBINPUT_MODEL_LENOVO_X230", EVDEV_MODEL_LENOVO_X230 },
+               { "LIBINPUT_MODEL_CHROMEBOOK", EVDEV_MODEL_CHROMEBOOK },
                { NULL, EVDEV_MODEL_DEFAULT },
        };
        const struct model_map *m = model_map;
index 151d10316856c813ab4edb5534141f683f5f67c5..2529c198bcf0daae0bcf62196795fec750f16ca3 100644 (file)
@@ -96,6 +96,7 @@ enum evdev_middlebutton_event {
 enum evdev_device_model {
        EVDEV_MODEL_DEFAULT,
        EVDEV_MODEL_LENOVO_X230,
+       EVDEV_MODEL_CHROMEBOOK,
 };
 
 struct mt_slot {
index 959be0ffc1ca8769ac12c185bab80e4ecf77d9f9..d6a7c91f04ba3114260cc6bbb6ae9f7a47a937a4 100644 (file)
 #
 # Sort by brand, model
 
+##########################################
+# Google
+##########################################
+
+# The various chromebooks, info from modinfo chromeos_laptop, touchpad names
+# extrapolated from the chromiumos touchad-tests repo
+# https://chromium.googlesource.com/chromiumos/platform/touchpad-tests
+libinput:name:Cypress APA Trackpad (cyapa):dmi:*pnFalco:pvr*
+libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pn*Mario*:
+libinput:name:Cypress APA Trackpad (cyapa):dmi:*pn*Butterfly*:
+libinput:name:Cypress APA Trackpad (cyapa):dmi:*pn*Peppy*:
+libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pn*ZGB*:
+libinput:name:Cypress APA Trackpad (cyapa):dmi:*pn*Parrot*:
+libinput:name:Cypress APA Trackpad (cyapa):dmi:*bvn*coreboot*:pn*Leon*:
+libinput:name:Cypress APA Trackpad (cyapa):dmi:*bvn*coreboot*:pn*Falco*:
+libinput:name:Cypress APA Trackpad (cyapa):dmi:*bvn*coreboot*:pn*Wolf*:
+libinput:name:Cypress APA Trackpad (cyapa):dmi:*svn*GOOGLE*:pn*Link*:
+libinput:name:SynPS/2 Synaptics TouchPad:dmi:*pn*Alex*:
+libinput:name:Cypress APA Trackpad (cyapa):dmi:*svn*SAMSUNG*:pn*Lumpy*:
+libinput:name:Atmel maXTouch Touchpad:dmi:*svn*GOOGLE*:pn*Samus*:
+ LIBINPUT_MODEL_CHROMEBOOK=1
+
 ##########################################
 # LENOVO
 ##########################################