diff options
Diffstat (limited to 'drivers/input/touchscreen/usbtouchscreen.c')
-rw-r--r-- | drivers/input/touchscreen/usbtouchscreen.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index fb7cb9bdfbd5..c07be07a69bb 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c | |||
@@ -13,6 +13,7 @@ | |||
13 | * - IdealTEK URTC1000 | 13 | * - IdealTEK URTC1000 |
14 | * - General Touch | 14 | * - General Touch |
15 | * - GoTop Super_Q2/GogoPen/PenPower tablets | 15 | * - GoTop Super_Q2/GogoPen/PenPower tablets |
16 | * - JASTEC USB touch controller/DigiTech DTR-02U | ||
16 | * | 17 | * |
17 | * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch> | 18 | * Copyright (C) 2004-2007 by Daniel Ritz <daniel.ritz@gmx.ch> |
18 | * Copyright (C) by Todd E. Johnson (mtouchusb.c) | 19 | * Copyright (C) by Todd E. Johnson (mtouchusb.c) |
@@ -118,6 +119,7 @@ enum { | |||
118 | DEVTYPE_IDEALTEK, | 119 | DEVTYPE_IDEALTEK, |
119 | DEVTYPE_GENERAL_TOUCH, | 120 | DEVTYPE_GENERAL_TOUCH, |
120 | DEVTYPE_GOTOP, | 121 | DEVTYPE_GOTOP, |
122 | DEVTYPE_JASTEC, | ||
121 | }; | 123 | }; |
122 | 124 | ||
123 | #define USB_DEVICE_HID_CLASS(vend, prod) \ | 125 | #define USB_DEVICE_HID_CLASS(vend, prod) \ |
@@ -191,6 +193,10 @@ static struct usb_device_id usbtouch_devices[] = { | |||
191 | {USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP}, | 193 | {USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP}, |
192 | #endif | 194 | #endif |
193 | 195 | ||
196 | #ifdef CONFIG_TOUCHSCREEN_USB_JASTEC | ||
197 | {USB_DEVICE(0x0f92, 0x0001), .driver_info = DEVTYPE_JASTEC}, | ||
198 | #endif | ||
199 | |||
194 | {} | 200 | {} |
195 | }; | 201 | }; |
196 | 202 | ||
@@ -559,6 +565,21 @@ static int gotop_read_data(struct usbtouch_usb *dev, unsigned char *pkt) | |||
559 | dev->x = ((pkt[1] & 0x38) << 4) | pkt[2]; | 565 | dev->x = ((pkt[1] & 0x38) << 4) | pkt[2]; |
560 | dev->y = ((pkt[1] & 0x07) << 7) | pkt[3]; | 566 | dev->y = ((pkt[1] & 0x07) << 7) | pkt[3]; |
561 | dev->touch = pkt[0] & 0x01; | 567 | dev->touch = pkt[0] & 0x01; |
568 | |||
569 | return 1; | ||
570 | } | ||
571 | #endif | ||
572 | |||
573 | /***************************************************************************** | ||
574 | * JASTEC Part | ||
575 | */ | ||
576 | #ifdef CONFIG_TOUCHSCREEN_USB_JASTEC | ||
577 | static 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; | ||
582 | |||
562 | return 1; | 583 | return 1; |
563 | } | 584 | } |
564 | #endif | 585 | #endif |
@@ -702,6 +723,17 @@ static struct usbtouch_device_info usbtouch_dev_info[] = { | |||
702 | .read_data = gotop_read_data, | 723 | .read_data = gotop_read_data, |
703 | }, | 724 | }, |
704 | #endif | 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 | }; | 737 | }; |
706 | 738 | ||
707 | 739 | ||