All of lore.kernel.org
 help / color / mirror / Atom feed
* Aiptek T-6000U staying in relative mode.
@ 2014-05-23  1:48 Jan Kandziora
  0 siblings, 0 replies; only message in thread
From: Jan Kandziora @ 2014-05-23  1:48 UTC (permalink / raw)
  To: linux-input

Hi all,

recently I tried wanted to use my tablet again with linux-3.11.6. After
a while I found out the kernel driver doesn't succeed to bring the
tablet to absolute mode. After fiddling around with the kernel driver,
I found it is related to the order of commands sent to the tablet while
initialization. My tablet insists the absolute mode command the last
one sent. So I patched my aiptek.c as follows:

-----------------------------------------------------------------------------------------
--- drivers/input/tablet/aiptek.c.orig  2014-05-23 03:35:05.402422214 +0200
+++ drivers/input/tablet/aiptek.c       2014-05-23 03:31:27.351508397 +0200
@@ -1003,6 +1003,18 @@
                return ret;
        input_set_abs_params(aiptek->inputdev, ABS_PRESSURE, 0, ret - 1, 0, 0);
 
+       /* Enable the macro keys */
+       if ((ret = aiptek_command(aiptek, 0x11, 0x02)) < 0)
+               return ret;
+#if 0
+       /* Execute FilterOn */
+       if ((ret = aiptek_command(aiptek, 0x17, 0x00)) < 0)
+               return ret;
+#endif
+       /* Execute AutoGainOn */
+       if ((ret = aiptek_command(aiptek, 0x12, 0xff)) < 0)
+               return ret;
+
        /* Depending on whether we are in absolute or relative mode, we will
         * do a switchToTablet(absolute) or switchToMouse(relative) command.
         */
@@ -1019,19 +1031,6 @@
                }
        }
 
-       /* Enable the macro keys */
-       if ((ret = aiptek_command(aiptek, 0x11, 0x02)) < 0)
-               return ret;
-#if 0
-       /* Execute FilterOn */
-       if ((ret = aiptek_command(aiptek, 0x17, 0x00)) < 0)
-               return ret;
-#endif
-
-       /* Execute AutoGainOn */
-       if ((ret = aiptek_command(aiptek, 0x12, 0xff)) < 0)
-               return ret;
-
        /* Reset the eventCount, so we track events from last (re)programming
         */
        aiptek->diagnostic = AIPTEK_DIAGNOSTIC_NA;
-----------------------------------------------------------------------------------------
That way it works in both relative and absolute mode and the macro keys are enabled, too.

There are some problems remaining with aiptek.c and my tablet. Anyone else here who has
aiptek hardware to test if my patches break anything with their tablets?

Kind regards

	Jan

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-23  1:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23  1:48 Aiptek T-6000U staying in relative mode Jan Kandziora

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.