usbtouchscreen.c (3a20ac2c52b1317f5a5f0bd9cd3cbe8495ddd026) | usbtouchscreen.c (f7370699fbbb18f97442d6f47cc2d478a911ad6f) |
---|---|
1/****************************************************************************** 2 * usbtouchscreen.c 3 * Driver for USB Touchscreens, supporting those devices: 4 * - eGalax Touchkit 5 * includes eTurboTouch CT-410/510/700 6 * - 3M/Microtouch EX II series 7 * - ITM 8 * - PanJit TouchSet 9 * - eTurboTouch 10 * - Gunze AHL61 11 * - DMC TSC-10/25 12 * - IRTOUCHSYSTEMS/UNITOP 13 * - IdealTEK URTC1000 14 * - General Touch 15 * - GoTop Super_Q2/GogoPen/PenPower tablets | 1/****************************************************************************** 2 * usbtouchscreen.c 3 * Driver for USB Touchscreens, supporting those devices: 4 * - eGalax Touchkit 5 * includes eTurboTouch CT-410/510/700 6 * - 3M/Microtouch EX II series 7 * - ITM 8 * - PanJit TouchSet 9 * - eTurboTouch 10 * - Gunze AHL61 11 * - DMC TSC-10/25 12 * - IRTOUCHSYSTEMS/UNITOP 13 * - IdealTEK URTC1000 14 * - General Touch 15 * - GoTop Super_Q2/GogoPen/PenPower tablets |
16 * - JASTEC USB touch controller/DigiTech DTR-02U |
|
16 * 17 * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch> 18 * Copyright (C) by Todd E. Johnson (mtouchusb.c) 19 * 20 * This program is free software; you can redistribute it and/or 21 * modify it under the terms of the GNU General Public License as 22 * published by the Free Software Foundation; either version 2 of the 23 * License, or (at your option) any later version. --- 89 unchanged lines hidden (view full) --- 113 DEVTYPE_ITM, 114 DEVTYPE_ETURBO, 115 DEVTYPE_GUNZE, 116 DEVTYPE_DMC_TSC10, 117 DEVTYPE_IRTOUCH, 118 DEVTYPE_IDEALTEK, 119 DEVTYPE_GENERAL_TOUCH, 120 DEVTYPE_GOTOP, | 17 * 18 * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch> 19 * Copyright (C) by Todd E. Johnson (mtouchusb.c) 20 * 21 * This program is free software; you can redistribute it and/or 22 * modify it under the terms of the GNU General Public License as 23 * published by the Free Software Foundation; either version 2 of the 24 * License, or (at your option) any later version. --- 89 unchanged lines hidden (view full) --- 114 DEVTYPE_ITM, 115 DEVTYPE_ETURBO, 116 DEVTYPE_GUNZE, 117 DEVTYPE_DMC_TSC10, 118 DEVTYPE_IRTOUCH, 119 DEVTYPE_IDEALTEK, 120 DEVTYPE_GENERAL_TOUCH, 121 DEVTYPE_GOTOP, |
122 DEVTYPE_JASTEC, |
|
121}; 122 123#define USB_DEVICE_HID_CLASS(vend, prod) \ 124 .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS \ 125 | USB_DEVICE_ID_MATCH_INT_PROTOCOL \ 126 | USB_DEVICE_ID_MATCH_DEVICE, \ 127 .idVendor = (vend), \ 128 .idProduct = (prod), \ --- 57 unchanged lines hidden (view full) --- 186#endif 187 188#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP 189 {USB_DEVICE(0x08f2, 0x007f), .driver_info = DEVTYPE_GOTOP}, 190 {USB_DEVICE(0x08f2, 0x00ce), .driver_info = DEVTYPE_GOTOP}, 191 {USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP}, 192#endif 193 | 123}; 124 125#define USB_DEVICE_HID_CLASS(vend, prod) \ 126 .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS \ 127 | USB_DEVICE_ID_MATCH_INT_PROTOCOL \ 128 | USB_DEVICE_ID_MATCH_DEVICE, \ 129 .idVendor = (vend), \ 130 .idProduct = (prod), \ --- 57 unchanged lines hidden (view full) --- 188#endif 189 190#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP 191 {USB_DEVICE(0x08f2, 0x007f), .driver_info = DEVTYPE_GOTOP}, 192 {USB_DEVICE(0x08f2, 0x00ce), .driver_info = DEVTYPE_GOTOP}, 193 {USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP}, 194#endif 195 |
196#ifdef CONFIG_TOUCHSCREEN_USB_JASTEC 197 {USB_DEVICE(0x0f92, 0x0001), .driver_info = DEVTYPE_JASTEC}, 198#endif 199 |
|
194 {} 195}; 196 197 198/***************************************************************************** 199 * eGalax part 200 */ 201 --- 352 unchanged lines hidden (view full) --- 554 * GoTop Part 555 */ 556#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP 557static int gotop_read_data(struct usbtouch_usb *dev, unsigned char *pkt) 558{ 559 dev->x = ((pkt[1] & 0x38) << 4) | pkt[2]; 560 dev->y = ((pkt[1] & 0x07) << 7) | pkt[3]; 561 dev->touch = pkt[0] & 0x01; | 200 {} 201}; 202 203 204/***************************************************************************** 205 * eGalax part 206 */ 207 --- 352 unchanged lines hidden (view full) --- 560 * GoTop Part 561 */ 562#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP 563static int gotop_read_data(struct usbtouch_usb *dev, unsigned char *pkt) 564{ 565 dev->x = ((pkt[1] & 0x38) << 4) | pkt[2]; 566 dev->y = ((pkt[1] & 0x07) << 7) | pkt[3]; 567 dev->touch = pkt[0] & 0x01; |
568 |
|
562 return 1; 563} 564#endif 565 | 569 return 1; 570} 571#endif 572 |
573/***************************************************************************** 574 * JASTEC Part 575 */ 576#ifdef CONFIG_TOUCHSCREEN_USB_JASTEC 577static int jastec_read_data(struct usbtouch_usb *dev, unsigned char *pkt) 578{ 579 dev->x = ((pkt[0] & 0x3f) << 6) | (pkt[2] & 0x3f); 580 dev->y = ((pkt[1] & 0x3f) << 6) | (pkt[3] & 0x3f); 581 dev->touch = (pkt[0] & 0x40) >> 6; |
|
566 | 582 |
583 return 1; 584} 585#endif 586 587 |
|
567/***************************************************************************** 568 * the different device descriptors 569 */ 570#ifdef MULTI_PACKET 571static void usbtouch_process_multi(struct usbtouch_usb *usbtouch, 572 unsigned char *pkt, int len); 573#endif 574 --- 122 unchanged lines hidden (view full) --- 697 .min_xc = 0x0, 698 .max_xc = 0x03ff, 699 .min_yc = 0x0, 700 .max_yc = 0x03ff, 701 .rept_size = 4, 702 .read_data = gotop_read_data, 703 }, 704#endif | 588/***************************************************************************** 589 * the different device descriptors 590 */ 591#ifdef MULTI_PACKET 592static void usbtouch_process_multi(struct usbtouch_usb *usbtouch, 593 unsigned char *pkt, int len); 594#endif 595 --- 122 unchanged lines hidden (view full) --- 718 .min_xc = 0x0, 719 .max_xc = 0x03ff, 720 .min_yc = 0x0, 721 .max_yc = 0x03ff, 722 .rept_size = 4, 723 .read_data = gotop_read_data, 724 }, 725#endif |
726 727#ifdef CONFIG_TOUCHSCREEN_USB_JASTEC 728 [DEVTYPE_JASTEC] = { 729 .min_xc = 0x0, 730 .max_xc = 0x0fff, 731 .min_yc = 0x0, 732 .max_yc = 0x0fff, 733 .rept_size = 4, 734 .read_data = jastec_read_data, 735 }, 736#endif |
|
705}; 706 707 708/***************************************************************************** 709 * Generic Part 710 */ 711static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch, 712 unsigned char *pkt, int len) --- 332 unchanged lines hidden --- | 737}; 738 739 740/***************************************************************************** 741 * Generic Part 742 */ 743static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch, 744 unsigned char *pkt, int len) --- 332 unchanged lines hidden --- |