Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69383
b: refs/heads/master
c: 9d5657d
h: refs/heads/master
i:
  69381: c6e6c53
  69379: 48b4762
  69375: 91f454e
v: v3
  • Loading branch information
Ilya Frolov authored and Dmitry Torokhov committed Oct 12, 2007
1 parent d4efd40 commit a1cbbf8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 064450140f1eab959bd0eca0245f449993216074
refs/heads/master: 9d5657db8c4a485b56b5c9174b52bab39b2fd16e
5 changes: 5 additions & 0 deletions trunk/drivers/input/touchscreen/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
31 changes: 31 additions & 0 deletions trunk/drivers/input/touchscreen/usbtouchscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ enum {
DEVTYPE_DMC_TSC10,
DEVTYPE_IRTOUCH,
DEVTYPE_IDEALTEK,
DEVTYPE_GENERAL_TOUCH,
};

static struct usb_device_id usbtouch_devices[] = {
Expand Down Expand Up @@ -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

{}
};

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

};


Expand Down

0 comments on commit a1cbbf8

Please sign in to comment.