usbtouchscreen.c (7b19ada2ed3c1eccb9fe94d74b05e1428224663d) | usbtouchscreen.c (14e4020630b364cc564172a476cd6a6ac4bc7393) |
---|---|
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 | 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 * - GoTop Super_Q2/GogoPen/PenPower tablets |
|
14 * | 15 * |
15 * Copyright (C) 2004-2006 by Daniel Ritz <daniel.ritz@gmx.ch> | 16 * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch> |
16 * Copyright (C) by Todd E. Johnson (mtouchusb.c) 17 * 18 * This program is free software; you can redistribute it and/or 19 * modify it under the terms of the GNU General Public License as 20 * published by the Free Software Foundation; either version 2 of the 21 * License, or (at your option) any later version. 22 * 23 * This program is distributed in the hope that it will be useful, but --- 86 unchanged lines hidden (view full) --- 110 DEVTYPE_3M, 111 DEVTYPE_ITM, 112 DEVTYPE_ETURBO, 113 DEVTYPE_GUNZE, 114 DEVTYPE_DMC_TSC10, 115 DEVTYPE_IRTOUCH, 116 DEVTYPE_IDEALTEK, 117 DEVTYPE_GENERAL_TOUCH, | 17 * Copyright (C) by Todd E. Johnson (mtouchusb.c) 18 * 19 * This program is free software; you can redistribute it and/or 20 * modify it under the terms of the GNU General Public License as 21 * published by the Free Software Foundation; either version 2 of the 22 * License, or (at your option) any later version. 23 * 24 * This program is distributed in the hope that it will be useful, but --- 86 unchanged lines hidden (view full) --- 111 DEVTYPE_3M, 112 DEVTYPE_ITM, 113 DEVTYPE_ETURBO, 114 DEVTYPE_GUNZE, 115 DEVTYPE_DMC_TSC10, 116 DEVTYPE_IRTOUCH, 117 DEVTYPE_IDEALTEK, 118 DEVTYPE_GENERAL_TOUCH, |
119 DEVTYPE_GOTOP, |
|
118}; 119 120static struct usb_device_id usbtouch_devices[] = { 121#ifdef CONFIG_TOUCHSCREEN_USB_EGALAX 122 {USB_DEVICE(0x3823, 0x0001), .driver_info = DEVTYPE_EGALAX}, 123 {USB_DEVICE(0x3823, 0x0002), .driver_info = DEVTYPE_EGALAX}, 124 {USB_DEVICE(0x0123, 0x0001), .driver_info = DEVTYPE_EGALAX}, 125 {USB_DEVICE(0x0eef, 0x0001), .driver_info = DEVTYPE_EGALAX}, --- 37 unchanged lines hidden (view full) --- 163#ifdef CONFIG_TOUCHSCREEN_USB_IDEALTEK 164 {USB_DEVICE(0x1391, 0x1000), .driver_info = DEVTYPE_IDEALTEK}, 165#endif 166 167#ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH 168 {USB_DEVICE(0x0dfc, 0x0001), .driver_info = DEVTYPE_GENERAL_TOUCH}, 169#endif 170 | 120}; 121 122static struct usb_device_id usbtouch_devices[] = { 123#ifdef CONFIG_TOUCHSCREEN_USB_EGALAX 124 {USB_DEVICE(0x3823, 0x0001), .driver_info = DEVTYPE_EGALAX}, 125 {USB_DEVICE(0x3823, 0x0002), .driver_info = DEVTYPE_EGALAX}, 126 {USB_DEVICE(0x0123, 0x0001), .driver_info = DEVTYPE_EGALAX}, 127 {USB_DEVICE(0x0eef, 0x0001), .driver_info = DEVTYPE_EGALAX}, --- 37 unchanged lines hidden (view full) --- 165#ifdef CONFIG_TOUCHSCREEN_USB_IDEALTEK 166 {USB_DEVICE(0x1391, 0x1000), .driver_info = DEVTYPE_IDEALTEK}, 167#endif 168 169#ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH 170 {USB_DEVICE(0x0dfc, 0x0001), .driver_info = DEVTYPE_GENERAL_TOUCH}, 171#endif 172 |
173#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP 174 {USB_DEVICE(0x08f2, 0x007f), .driver_info = DEVTYPE_GOTOP}, 175 {USB_DEVICE(0x08f2, 0x00ce), .driver_info = DEVTYPE_GOTOP}, 176 {USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP}, 177#endif 178 |
|
171 {} 172}; 173 174 175/***************************************************************************** 176 * eGalax part 177 */ 178 --- 317 unchanged lines hidden (view full) --- 496 dev->press = pkt[5] & 0xff; 497 dev->touch = pkt[0] & 0x01; 498 499 return 1; 500} 501#endif 502 503/***************************************************************************** | 179 {} 180}; 181 182 183/***************************************************************************** 184 * eGalax part 185 */ 186 --- 317 unchanged lines hidden (view full) --- 504 dev->press = pkt[5] & 0xff; 505 dev->touch = pkt[0] & 0x01; 506 507 return 1; 508} 509#endif 510 511/***************************************************************************** |
512 * GoTop Part 513 */ 514#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP 515static int gotop_read_data(struct usbtouch_usb *dev, unsigned char *pkt) 516{ 517 dev->x = ((pkt[1] & 0x38) << 4) | pkt[2]; 518 dev->y = ((pkt[1] & 0x07) << 7) | pkt[3]; 519 dev->touch = pkt[0] & 0x01; 520 return 1; 521} 522#endif 523 524 525/***************************************************************************** |
|
504 * the different device descriptors 505 */ 506static struct usbtouch_device_info usbtouch_dev_info[] = { 507#ifdef CONFIG_TOUCHSCREEN_USB_EGALAX 508 [DEVTYPE_EGALAX] = { 509 .min_xc = 0x0, 510 .max_xc = 0x07ff, 511 .min_yc = 0x0, --- 106 unchanged lines hidden (view full) --- 618#ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH 619 [DEVTYPE_GENERAL_TOUCH] = { 620 .min_xc = 0x0, 621 .max_xc = 0x0500, 622 .min_yc = 0x0, 623 .max_yc = 0x0500, 624 .rept_size = 7, 625 .read_data = general_touch_read_data, | 526 * the different device descriptors 527 */ 528static struct usbtouch_device_info usbtouch_dev_info[] = { 529#ifdef CONFIG_TOUCHSCREEN_USB_EGALAX 530 [DEVTYPE_EGALAX] = { 531 .min_xc = 0x0, 532 .max_xc = 0x07ff, 533 .min_yc = 0x0, --- 106 unchanged lines hidden (view full) --- 640#ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH 641 [DEVTYPE_GENERAL_TOUCH] = { 642 .min_xc = 0x0, 643 .max_xc = 0x0500, 644 .min_yc = 0x0, 645 .max_yc = 0x0500, 646 .rept_size = 7, 647 .read_data = general_touch_read_data, |
626 } | 648 }, |
627#endif 628 | 649#endif 650 |
651#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP 652 [DEVTYPE_GOTOP] = { 653 .min_xc = 0x0, 654 .max_xc = 0x03ff, 655 .min_yc = 0x0, 656 .max_yc = 0x03ff, 657 .rept_size = 4, 658 .read_data = gotop_read_data, 659 }, 660#endif |
|
629}; 630 631 632/***************************************************************************** 633 * Generic Part 634 */ 635static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch, 636 unsigned char *pkt, int len) --- 226 unchanged lines hidden (view full) --- 863 usb_to_input_id(udev, &input_dev->id); 864 input_dev->dev.parent = &intf->dev; 865 866 input_set_drvdata(input_dev, usbtouch); 867 868 input_dev->open = usbtouch_open; 869 input_dev->close = usbtouch_close; 870 | 661}; 662 663 664/***************************************************************************** 665 * Generic Part 666 */ 667static void usbtouch_process_pkt(struct usbtouch_usb *usbtouch, 668 unsigned char *pkt, int len) --- 226 unchanged lines hidden (view full) --- 895 usb_to_input_id(udev, &input_dev->id); 896 input_dev->dev.parent = &intf->dev; 897 898 input_set_drvdata(input_dev, usbtouch); 899 900 input_dev->open = usbtouch_open; 901 input_dev->close = usbtouch_close; 902 |
871 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); 872 input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); | 903 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 904 input_dev->keybit[LONG(BTN_TOUCH)] = BIT(BTN_TOUCH); |
873 input_set_abs_params(input_dev, ABS_X, type->min_xc, type->max_xc, 0, 0); 874 input_set_abs_params(input_dev, ABS_Y, type->min_yc, type->max_yc, 0, 0); 875 if (type->max_press) 876 input_set_abs_params(input_dev, ABS_PRESSURE, type->min_press, 877 type->max_press, 0, 0); 878 879 usb_fill_int_urb(usbtouch->irq, usbtouch->udev, 880 usb_rcvintpipe(usbtouch->udev, endpoint->bEndpointAddress), --- 81 unchanged lines hidden --- | 905 input_set_abs_params(input_dev, ABS_X, type->min_xc, type->max_xc, 0, 0); 906 input_set_abs_params(input_dev, ABS_Y, type->min_yc, type->max_yc, 0, 0); 907 if (type->max_press) 908 input_set_abs_params(input_dev, ABS_PRESSURE, type->min_press, 909 type->max_press, 0, 0); 910 911 usb_fill_int_urb(usbtouch->irq, usbtouch->udev, 912 usb_rcvintpipe(usbtouch->udev, endpoint->bEndpointAddress), --- 81 unchanged lines hidden --- |