From patchwork Fri Jun 11 07:40:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 105513 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5B7nEkH016684 for ; Fri, 11 Jun 2010 07:49:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752969Ab0FKHtM (ORCPT ); Fri, 11 Jun 2010 03:49:12 -0400 Received: from ibawizard.net ([82.208.49.253]:53039 "EHLO mengele.ibawizard.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755069Ab0FKHtL (ORCPT ); Fri, 11 Jun 2010 03:49:11 -0400 Received: by mengele.ibawizard.net (Postfix, from userid 1002) id 3B9CB1D36130; Fri, 11 Jun 2010 09:40:54 +0200 (CEST) From: =?utf-8?q?Petr=20=C5=A0tetiar?= To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , Jiri Kosina , ynezz@true.cz Subject: [PATCH 1/2] Input: usbtouchscreen - add support for ET&T TC4UM touchscreen controller Date: Fri, 11 Jun 2010 09:40:53 +0200 Message-Id: <1276242054-11127-1-git-send-email-ynezz@true.cz> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <20100603075720.GQ26052@ibawizard.net> References: <20100603075720.GQ26052@ibawizard.net> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 11 Jun 2010 07:49:15 +0000 (UTC) diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 3b9d5e2..e835f04 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -540,9 +540,9 @@ config TOUCHSCREEN_USB_ZYTRONIC bool "Zytronic controller" if EMBEDDED depends on TOUCHSCREEN_USB_COMPOSITE -config TOUCHSCREEN_USB_ETT_TC5UH +config TOUCHSCREEN_USB_ETT_TC45USB default y - bool "ET&T TC5UH touchscreen controler support" if EMBEDDED + bool "ET&T USB series TC4UM/TC5UH touchscreen controler support" if EMBEDDED depends on TOUCHSCREEN_USB_COMPOSITE config TOUCHSCREEN_USB_NEXIO diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 567d572..3244542 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -135,7 +135,7 @@ enum { DEVTYPE_JASTEC, DEVTYPE_E2I, DEVTYPE_ZYTRONIC, - DEVTYPE_TC5UH, + DEVTYPE_TC45USB, DEVTYPE_NEXIO, }; @@ -222,8 +222,11 @@ static const struct usb_device_id usbtouch_devices[] = { {USB_DEVICE(0x14c8, 0x0003), .driver_info = DEVTYPE_ZYTRONIC}, #endif -#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH - {USB_DEVICE(0x0664, 0x0309), .driver_info = DEVTYPE_TC5UH}, +#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC45USB + /* TC5UH */ + {USB_DEVICE(0x0664, 0x0309), .driver_info = DEVTYPE_TC45USB}, + /* TC4UM */ + {USB_DEVICE(0x0664, 0x0306), .driver_info = DEVTYPE_TC45USB}, #endif #ifdef CONFIG_TOUCHSCREEN_USB_NEXIO @@ -574,10 +577,10 @@ static int irtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt) #endif /***************************************************************************** - * ET&T TC5UH part + * ET&T TC5UH/TC4UM part */ -#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH -static int tc5uh_read_data(struct usbtouch_usb *dev, unsigned char *pkt) +#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC45USB +static int tc45usb_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]; @@ -1104,14 +1107,14 @@ static struct usbtouch_device_info usbtouch_dev_info[] = { }, #endif -#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH - [DEVTYPE_TC5UH] = { +#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC45USB + [DEVTYPE_TC45USB] = { .min_xc = 0x0, .max_xc = 0x0fff, .min_yc = 0x0, .max_yc = 0x0fff, .rept_size = 5, - .read_data = tc5uh_read_data, + .read_data = tc45usb_read_data, }, #endif