Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9d5657db8c4a485b56b5c9174b52bab39b2fd16e
Commit:     9d5657db8c4a485b56b5c9174b52bab39b2fd16e
Parent:     064450140f1eab959bd0eca0245f449993216074
Author:     Ilya Frolov <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 12 14:19:40 2007 -0400
Committer:  Dmitry Torokhov <[EMAIL PROTECTED]>
CommitDate: Fri Oct 12 14:19:40 2007 -0400

    Input: usbtouchscreen - add support for GeneralTouch devices
    
    Signed-off-by: Ilya Frolov <[EMAIL PROTECTED]>
    Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]>
---
 drivers/input/touchscreen/Kconfig          |    5 ++++
 drivers/input/touchscreen/usbtouchscreen.c |   31 ++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/drivers/input/touchscreen/Kconfig 
b/drivers/input/touchscreen/Kconfig
index e73ce6b..e3e0baa 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -254,4 +254,9 @@ config TOUCHSCREEN_USB_IDEALTEK
        bool "IdealTEK URTC1000 device support" if EMBEDDED
        depends on TOUCHSCREEN_USB_COMPOSITE
 
+config TOUCHSCREEN_USB_GENERAL_TOUCH
+       default y
+       bool "GeneralTouch Touchscreen device support" if EMBEDDED
+       depends on TOUCHSCREEN_USB_COMPOSITE
+
 endif
diff --git a/drivers/input/touchscreen/usbtouchscreen.c 
b/drivers/input/touchscreen/usbtouchscreen.c
index 13fbda0..9b3a26c 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -114,6 +114,7 @@ enum {
        DEVTYPE_DMC_TSC10,
        DEVTYPE_IRTOUCH,
        DEVTYPE_IDEALTEK,
+       DEVTYPE_GENERAL_TOUCH,
 };
 
 static struct usb_device_id usbtouch_devices[] = {
@@ -163,6 +164,10 @@ static struct usb_device_id usbtouch_devices[] = {
        {USB_DEVICE(0x1391, 0x1000), .driver_info = DEVTYPE_IDEALTEK},
 #endif
 
+#ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH
+       {USB_DEVICE(0x0dfc, 0x0001), .driver_info = DEVTYPE_GENERAL_TOUCH},
+#endif
+
        {}
 };
 
@@ -480,6 +485,20 @@ static int idealtek_read_data(struct usbtouch_usb *dev, 
unsigned char *pkt)
 }
 #endif
 
+/*****************************************************************************
+ * General Touch Part
+ */
+#ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH
+static int general_touch_read_data(struct usbtouch_usb *dev, unsigned char 
*pkt)
+{
+       dev->x = ((pkt[2] & 0x0F) << 8) | pkt[1] ;
+       dev->y = ((pkt[4] & 0x0F) << 8) | pkt[3] ;
+       dev->press = pkt[5] & 0xff;
+       dev->touch = pkt[0] & 0x01;
+
+       return 1;
+}
+#endif
 
 /*****************************************************************************
  * the different device descriptors
@@ -595,6 +614,18 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
                .read_data      = idealtek_read_data,
        },
 #endif
+
+#ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH
+       [DEVTYPE_GENERAL_TOUCH] = {
+               .min_xc         = 0x0,
+               .max_xc         = 0x0500,
+               .min_yc         = 0x0,
+               .max_yc         = 0x0500,
+               .rept_size      = 7,
+               .read_data      = general_touch_read_data,
+       }
+#endif
+
 };
 
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to