From: "Petr Štetiar" <ynezz@true.cz>
To: linux-input@vger.kernel.org
Cc: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Jiri Kosina" <jikos@novell.com>, "Petr Štetiar" <ynezz@true.cz>
Subject: [PATCH] Input: usbtouchscreen - add support for ET&T TC5UH touchscreen controller
Date: Sat, 28 Nov 2009 11:54:37 +0100 [thread overview]
Message-ID: <1259405677-9416-1-git-send-email-ynezz@true.cz> (raw)
This patch adds support for the ET&T TC5UH 5-wire USB touchscreen controller.
More info at http://www.etandt.com.tw/board_solution.html
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
drivers/input/touchscreen/Kconfig | 5 ++++
drivers/input/touchscreen/usbtouchscreen.c | 30 ++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 8cc453c..a3ba9e1 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -490,6 +490,11 @@ config TOUCHSCREEN_USB_E2I
bool "e2i Touchscreen controller (e.g. from Mimo 740)"
depends on TOUCHSCREEN_USB_COMPOSITE
+config TOUCHSCREEN_USB_ETT_TC5UH
+ default y
+ bool "ET&T TC5UH touchscreen controler support" if EMBEDDED
+ depends on TOUCHSCREEN_USB_COMPOSITE
+
config TOUCHSCREEN_TOUCHIT213
tristate "Sahara TouchIT-213 touchscreen"
select SERIO
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 68ece58..e3ab3f1 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -121,6 +121,7 @@ enum {
DEVTYPE_GOTOP,
DEVTYPE_JASTEC,
DEVTYPE_E2I,
+ DEVTYPE_TC5UH,
};
#define USB_DEVICE_HID_CLASS(vend, prod) \
@@ -201,6 +202,11 @@ static struct usb_device_id usbtouch_devices[] = {
#ifdef CONFIG_TOUCHSCREEN_USB_E2I
{USB_DEVICE(0x1ac7, 0x0001), .driver_info = DEVTYPE_E2I},
#endif
+
+#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
+ {USB_DEVICE(0x0664, 0x0309), .driver_info = DEVTYPE_TC5UH},
+#endif
+
{}
};
@@ -621,6 +627,19 @@ static int jastec_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
}
#endif
+/*****************************************************************************
+ * ET&T TC5UH part
+ */
+#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
+static int tc5uh_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->touch = pkt[0] & 0x01;
+
+ return 1;
+}
+#endif
/*****************************************************************************
* the different device descriptors
@@ -783,6 +802,17 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
.read_data = e2i_read_data,
},
#endif
+
+#ifdef CONFIG_TOUCHSCREEN_USB_ETT_TC5UH
+ [DEVTYPE_TC5UH] = {
+ .min_xc = 0x0,
+ .max_xc = 0x0fff,
+ .min_yc = 0x0,
+ .max_yc = 0x0fff,
+ .rept_size = 5,
+ .read_data = tc5uh_read_data,
+ },
+#endif
};
--
1.6.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2009-11-28 11:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-28 10:54 Petr Štetiar [this message]
2009-11-29 5:30 ` [PATCH] Input: usbtouchscreen - add support for ET&T TC5UH touchscreen controller Dmitry Torokhov
2009-11-29 10:53 ` Petr Štetiar
2009-11-29 11:36 ` Petr Štetiar
2009-11-30 8:10 ` Dmitry Torokhov
2009-12-09 10:20 ` Jiri Kosina
2009-12-09 21:09 ` [PATCH] HID: blacklist " Petr Štetiar
2009-12-10 11:18 ` Jiri Kosina
2009-12-10 11:38 ` Petr Štetiar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1259405677-9416-1-git-send-email-ynezz@true.cz \
--to=ynezz@true.cz \
--cc=dmitry.torokhov@gmail.com \
--cc=jikos@novell.com \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).