From 3758f3cdef0d7d6388025a1a843cafdcfd007351 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Jul 2016 10:08:16 +1000 Subject: [PATCH] test: make one ALPS and the Synaptics i2c test devices Dell touchpads The i2c one came from an Dell XPS13. The ALPS one I can't remember but highly likely they were on Dells and if not, nothing really changes here anyway because it's not a clickpad and right now only clickpads have dell-specific behaviour. Signed-off-by: Peter Hutterer --- test/litest-device-alps-dualpoint.c | 11 +++++++++++ test/litest-device-synaptics-i2c.c | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/test/litest-device-alps-dualpoint.c b/test/litest-device-alps-dualpoint.c index 8e42f9a8..50204270 100644 --- a/test/litest-device-alps-dualpoint.c +++ b/test/litest-device-alps-dualpoint.c @@ -102,6 +102,16 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; +static const char udev_rule[] = +"ACTION==\"remove\", GOTO=\"touchpad_end\"\n" +"KERNEL!=\"event*\", GOTO=\"touchpad_end\"\n" +"ENV{ID_INPUT_TOUCHPAD}==\"\", GOTO=\"touchpad_end\"\n" +"\n" +"ATTRS{name}==\"litest AlpsPS/2 ALPS DualPoint TouchPad\"," +" ENV{LIBINPUT_MODEL_DELL_TOUCHPAD}=\"1\"\n" +"\n" +"LABEL=\"touchpad_end\""; + struct litest_test_device litest_alps_dualpoint_device = { .type = LITEST_ALPS_DUALPOINT, .features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_SEMI_MT, @@ -114,6 +124,7 @@ struct litest_test_device litest_alps_dualpoint_device = { .id = &input_id, .events = events, .absinfo = absinfo, + .udev_rule = udev_rule, }; static void diff --git a/test/litest-device-synaptics-i2c.c b/test/litest-device-synaptics-i2c.c index b6b632bc..be826a4d 100644 --- a/test/litest-device-synaptics-i2c.c +++ b/test/litest-device-synaptics-i2c.c @@ -88,6 +88,16 @@ static struct input_absinfo absinfo[] = { { .value = -1 } }; +static const char udev_rule[] = +"ACTION==\"remove\", GOTO=\"touchpad_end\"\n" +"KERNEL!=\"event*\", GOTO=\"touchpad_end\"\n" +"ENV{ID_INPUT_TOUCHPAD}==\"\", GOTO=\"touchpad_end\"\n" +"\n" +"ATTRS{name}==\"litest DLL0704:01 06CB:76AD Touchpad\"," +" ENV{LIBINPUT_MODEL_DELL_TOUCHPAD}=\"1\"\n" +"\n" +"LABEL=\"touchpad_end\""; + struct litest_test_device litest_synaptics_i2c_device = { .type = LITEST_SYNAPTICS_I2C, .features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON, @@ -99,4 +109,5 @@ struct litest_test_device litest_synaptics_i2c_device = { .id = &input_id, .events = events, .absinfo = absinfo, + .udev_rule = udev_rule, };