X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Finput%2Ftouchscreen%2Fusbtouchscreen.c;h=19055e7381f8423b52e14763c43281b7672ccb09;hp=5f34b78d5ddbef126193d13b1c2afc4e8a3600b8;hb=81f8320f624a785d77443ace83391d0fdee695f6;hpb=6d435365dd49ac5f7fe6f0e757e942875b1d1550 diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 5f34b78d5ddb..19055e7381f8 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -11,8 +11,9 @@ * - DMC TSC-10/25 * - IRTOUCHSYSTEMS/UNITOP * - IdealTEK URTC1000 + * - GoTop Super_Q2/GogoPen/PenPower tablets * - * Copyright (C) 2004-2006 by Daniel Ritz + * Copyright (C) 2004-2007 by Daniel Ritz * Copyright (C) by Todd E. Johnson (mtouchusb.c) * * This program is free software; you can redistribute it and/or @@ -115,6 +116,7 @@ enum { DEVTYPE_IRTOUCH, DEVTYPE_IDEALTEK, DEVTYPE_GENERAL_TOUCH, + DEVTYPE_GOTOP, }; static struct usb_device_id usbtouch_devices[] = { @@ -168,6 +170,12 @@ static struct usb_device_id usbtouch_devices[] = { {USB_DEVICE(0x0dfc, 0x0001), .driver_info = DEVTYPE_GENERAL_TOUCH}, #endif +#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP + {USB_DEVICE(0x08f2, 0x007f), .driver_info = DEVTYPE_GOTOP}, + {USB_DEVICE(0x08f2, 0x00ce), .driver_info = DEVTYPE_GOTOP}, + {USB_DEVICE(0x08f2, 0x00f4), .driver_info = DEVTYPE_GOTOP}, +#endif + {} }; @@ -500,6 +508,20 @@ static int general_touch_read_data(struct usbtouch_usb *dev, unsigned char *pkt) } #endif +/***************************************************************************** + * GoTop Part + */ +#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP +static int gotop_read_data(struct usbtouch_usb *dev, unsigned char *pkt) +{ + dev->x = ((pkt[1] & 0x38) << 4) | pkt[2]; + dev->y = ((pkt[1] & 0x07) << 7) | pkt[3]; + dev->touch = pkt[0] & 0x01; + return 1; +} +#endif + + /***************************************************************************** * the different device descriptors */ @@ -623,9 +645,19 @@ static struct usbtouch_device_info usbtouch_dev_info[] = { .max_yc = 0x0500, .rept_size = 7, .read_data = general_touch_read_data, - } + }, #endif +#ifdef CONFIG_TOUCHSCREEN_USB_GOTOP + [DEVTYPE_GOTOP] = { + .min_xc = 0x0, + .max_xc = 0x03ff, + .min_yc = 0x0, + .max_yc = 0x03ff, + .rept_size = 4, + .read_data = gotop_read_data, + }, +#endif };