]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Input: wacom - fix pressure in Cintiq 21UX2
authorAristeu Rozanski <aris@redhat.com>
Sun, 10 Oct 2010 21:12:33 +0000 (14:12 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 29 Oct 2010 04:51:20 +0000 (21:51 -0700)
commit ca047fedd89bbb4b79b61e0656a7b799e4e45e6d upstream.

Currently the pressure range in Cintiq 21UX2 is limited to half of the
supported. This patch fixes the problem.

Signed-off-by: Aristeu Rozanski <aris@redhat.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/input/tablet/wacom_wac.c

index 415f6306105dba7ae722e3c5ce5706fb09109949..8a6a2a1733c4698abbbaedf4fda29a37441a7486 100644 (file)
@@ -409,8 +409,10 @@ static void wacom_intuos_general(struct wacom_wac *wacom)
        /* general pen packet */
        if ((data[1] & 0xb8) == 0xa0) {
                t = (data[6] << 2) | ((data[7] >> 6) & 3);
-               if (features->type >= INTUOS4S && features->type <= INTUOS4L)
+               if ((features->type >= INTUOS4S && features->type <= INTUOS4L) ||
+                   features->type == WACOM_21UX2) {
                        t = (t << 1) | (data[1] & 1);
+               }
                input_report_abs(input, ABS_PRESSURE, t);
                input_report_abs(input, ABS_TILT_X,
                                ((data[7] << 1) & 0x7e) | (data[8] >> 7));