1]~w?)..' /******************************************************************************
'-RacNY * usbtouchscreen.c
gHstdp_3 * Driver for
USB Touchscreens, supporting those devices:
\*e\MOp6 * - eGalax Touchkit
@lE'D":? * includes eTurboTouch CT-410/510/700
;mk[! * - 3M/Microtouch EX II series
I@9'd$YY * - ITM
_;;Zz&c * - PanJit TouchSet
<R@,wzK * - eTurboTouch
9/(jY$Ar * - Gunze AHL61
%k1Pyv;] * - DMC TSC-10/25
esnq/ * - IRTOUCHSYSTEMS/UNITOP
"hf
|7E_ * - IdealTEK URTC1000
Wvr{l * - General Touch
h.PBe * - GoTop Super_Q2/GogoPen/PenPower tablets
}Rw ,4 * - JASTEC USB touch controller/DigiTech DTR-02U
6j<!W+~G * - Zytronic capacitive touchscreen
OA[e}Vn * - NEXIO/iNexio
=zyA~}M2 *
n^T,R * Copyright (C) 2004-2007 by Daniel Ritz <
daniel.ritz@gmx.ch>
qt~=47<d * Copyright (C) by Todd E. Johnson (mtouchusb.c)
\4>,L_O *
&2`p#riAS * This program is free software; you can redistribute it and/or
=,(TP * modify it under the terms of the GNU General Public License as
~x9]?T * published by the Free Software Foundation; either version 2 of the
@9B*V~ < * License, or (at your option) any later version.
Xv-p7$?f *
RTm/-6[N * This program is distributed in the hope that it will be useful, but
+1y$#~dl * WITHOUT ANY WARRANTY; without even the implied warranty of
c[,h|~K/_? * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[Vo5$w * General Public License for more details.
~_D.&-xUF *
T^1
Z_|A * You should have received a copy of the GNU General Public License
h<Aq|* * along with this program; if not, write to the Free Software
pZ.b
X * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
(jc& Fk *
{p84fR1P * Driver is based on touchkitusb.c
8D*nU3O * - ITM parts are from itmtouch.c
w*ans}P7 * - 3M parts are from mtouchusb.c
/D&&7;jJ * - PanJit parts are from an unmerged driver by Lanslott Gish
Vb(b3 * - DMC TSC 10/25 are from Holger Schurig, with ideas from an unmerged
pUXoSnIq: * driver from Marius Vollmer
=:^aBN# *
P0n1I7| *****************************************************************************/
gA!@oiq@ yWi-ic
[n //#define DEBUG
sE pI)9 Y &Cb
#include <linux/kernel.h>
aj1]ZT\ #include <linux/slab.h>
|vI`u[P #include <linux/input.h>
nF,F#V8l #include <linux/module.h>
%y6(+I#P #include <linux/init.h>
G](4!G& #include <linux/usb.h>
Q\N*)&Sd<M #include <linux/usb/input.h>
cq4~(PXTg #include <linux/hid.h>
K oJ=0jM# q!ZM Wg LjI`$r.B #define DRIVER_VERSION "v0.6"
D:1@1Jr #define DRIVER_AUTHOR "Daniel Ritz <
daniel.ritz@gmx.ch>"
7FG;fJ;&NZ #define DRIVER_DESC "USB Touchscreen Driver"
p{g4`o }5;4'l8 static int swap_xy;
6:ettdj module_param(swap_xy, bool, 0644);
fST.p|b7 MODULE_PARM_DESC(swap_xy, "If set X and Y axes are swapped.");
1!<t8,W4 Q/+`9z+c static int hwcalib_xy;
@NL cO} module_param(hwcalib_xy, bool, 0644);
ZZY# . MODULE_PARM_DESC(hwcalib_xy, "If set hw-calibrated X/Y are used if available");
~L)~p%rbi 94"+l@K /* device specifc data/functions */
h_%q`y , struct usbtouch_usb;
X-c|jn7 struct usbtouch_device_info {
SVe]2ONd int min_xc, max_xc;
AW]\n;f
int min_yc, max_yc;
LhJUoX int min_press, max_press;
NKu[6J?) int rept_size;
?=? _32O g#J`7n /*
}
oPO` * Always service the USB devices irq not just when the input device is
3uLG$`N * open. This is useful when devices have a watchdog which prevents us
5=pE*ETJ * from periodically polling the device. Leave this unset unless your
u 272)@R * touchscreen device requires it, as it does consume more of the USB
^_WR) F'K * bandwidth.
]r
Uj<[O */
@J[@Pu O bool irq_always;
?jmP]MM F]aoTy void (*process_pkt) (struct usbtouch_usb *usbtouch, unsigned char *pkt, int len);
J9Ao*IW~ x-BU$bx5 /*
w% %q/![uy * used to get the packet len. possible return values:
*w+'I*QSt~ * > 0: packet len
5h5izA'0' * = 0: skip one byte
nip6|dN * < 0: -return value more bytes needed
Z`Y&cK