The touch interfaces on for these two devices have not been set
up properly and will likely be mis-detected by xf86-input-wacom
and result in a non-functional touch device. This patch ensures
the driver declares the appropriate axes for the pen and touch
interfaces, and routes touches from both through the appropriate
IRQ method.

Signed-off-by: Jason Gerecke <killert...@gmail.com>
---
 2.6.30/wacom_wac.c | 55 ++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 45 insertions(+), 10 deletions(-)

diff --git a/2.6.30/wacom_wac.c b/2.6.30/wacom_wac.c
index 4fe556f..0cb8900 100644
--- a/2.6.30/wacom_wac.c
+++ b/2.6.30/wacom_wac.c
@@ -1318,12 +1318,6 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t 
len)
        case INTUOS4S:
        case INTUOS4:
        case INTUOS4L:
-       case INTUOS5S:
-       case INTUOS5:
-       case INTUOS5L:
-       case INTUOSPS:
-       case INTUOSPM:
-       case INTUOSPL:
        case CINTIQ:
        case WACOM_BEE:
        case WACOM_13HD:
@@ -1334,6 +1328,18 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t 
len)
                sync = wacom_intuos_irq(wacom_wac);
                break;
 
+       case INTUOS5S:
+       case INTUOS5:
+       case INTUOS5L:
+       case INTUOSPS:
+       case INTUOSPM:
+       case INTUOSPL:
+               if (len == WACOM_PKGLEN_BBTOUCH3)
+                       sync = wacom_bpt3_touch(wacom_wac);
+               else
+                       sync = wacom_intuos_irq(wacom_wac);
+               break;
+
        case TABLETPC:
        case TABLETPC2FG:
        case MTTPC:
@@ -1553,18 +1559,47 @@ void wacom_setup_input_capabilities(struct input_dev 
*input_dev,
                wacom_setup_intuos(wacom_wac);
                break;
 
-       case INTUOSPM:
-       case INTUOSPL:
        case INTUOS5:
        case INTUOS5L:
+       case INTUOSPM:
+       case INTUOSPL:
+               if (features->device_type == BTN_TOOL_PEN) {
+                       __set_bit(BTN_7, input_dev->keybit);
+                       __set_bit(BTN_8, input_dev->keybit);
+               }
+               /* fall through */
+
+       case INTUOS5S:
+       case INTUOSPS:
+               if (features->device_type == BTN_TOOL_PEN) {
+                       for (i = 0; i < 7; i++)
+                               __set_bit(BTN_0 + i, input_dev->keybit);
+
+                       input_set_abs_params(input_dev, ABS_DISTANCE, 0,
+                                             features->distance_max,
+                                             0, 0);
+
+                       input_set_abs_params(input_dev, ABS_Z, -900, 899, 0, 0);
+
+                       wacom_setup_intuos(wacom_wac);
+               } else if (features->device_type == BTN_TOOL_DOUBLETAP) {
+                       __clear_bit(ABS_MISC, input_dev->absbit);
+
+                       __set_bit(BTN_TOOL_FINGER, input_dev->keybit);
+                       __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit);
+                       __set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit);
+                       __set_bit(BTN_TOOL_QUADTAP, input_dev->keybit);
+
+                       input_set_abs_params(input_dev, ABS_TOOL_WIDTH, 0, 255, 
0, 0);
+               }
+               break;
+
        case INTUOS4:
        case INTUOS4L:
                __set_bit(BTN_7, input_dev->keybit);
                __set_bit(BTN_8, input_dev->keybit);
                /* fall through */
 
-       case INTUOSPS:
-       case INTUOS5S:
        case INTUOS4S:
                for (i = 0; i < 7; i++)
                        __set_bit(BTN_0 + i, input_dev->keybit);
-- 
1.8.4


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to