Input: usbtouchscreen - add support for ET&T TC5UH touchscreen controller
Subsystems (2)
PATCH 1/1 Input: usbtouchscreen - add support for ET&T TC5UH touchscreen controller
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
--- drivers/input/touchscreen/Kconfig | 5 ++++ drivers/input/touchscreen/usbtouchscreen.c | 30 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 0 deletions(-)
drivers/input/touchscreen/Kconfig +5 -0
@@ -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
drivers/input/touchscreen/usbtouchscreen.c +30 -0
@@ -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 };
Signature · 6 lines
1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Dmitry Torokhov
maintainerHi Petr,
Quoted 2 lines · Petr Štetiar
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
Hmm, this looks like Panjit protocol, just report size is different, 5 vs. 8...
The link abouve mentions HID compliance? Does it not wok properly with HID driver? Do we need to blacklist it in HID?
Thanks.
Signature · 5 lines
Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Dmitry Torokhov <[email protected]> [2009-11-28 21:30:21]:
Quoted 1 line
Hi Petr,
Hi Dmitry,
Quoted 6 lines · Petr Štetiar
Quoted 2 lines
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
Hmm, this looks like Panjit protocol, just report size is different, 5 vs. 8...
Yes, 5 vs 8 is only difference.
Quoted 2 lines
The link abouve mentions HID compliance? Does it not wok properly with HID driver? Do we need to blacklist it in HID?
No, it doesn't work with HID. Maybe they claim HID compliance, but you need some binary drivers to make it work anyway. I asked them for protocol specification and they sent me just single PDF page with description of that simple 5 byte stream protocol. I wasn't unsure so I asked Jikos (Jiri Kosina) on IRC where should this stuff go and he told me, that it should be placed in usbtouchscreen.
Thanks.
-- ynezz
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Dmitry Torokhov <[email protected]> [2009-11-28 21:30:21]:
Quoted 2 lines
The link abouve mentions HID compliance? Does it not wok properly with HID driver? Do we need to blacklist it in HID?
Thinking about it again, we maybe need to blacklist it in HID, because it can be picked up by hidraw driver.
-- ynezz
Dmitry Torokhov
maintainerQuoted 8 lines · Petr Štetiar
Dmitry Torokhov <[email protected]> [2009-11-28 21:30:21]:
Quoted 2 lines
The link abouve mentions HID compliance? Does it not wok properly with HID driver? Do we need to blacklist it in HID?
Thinking about it again, we maybe need to blacklist it in HID, because it can be picked up by hidraw driver.
OK, I applied th epatch to the 'next' branch, please send the blacklist patch to Jiri.
Thanks.
Signature · 5 lines
Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Dmitry Torokhov
Quoted 6 lines
Quoted 2 lines
The link abouve mentions HID compliance? Does it not wok properly with HID driver? Do we need to blacklist it in HID?
Thinking about it again, we maybe need to blacklist it in HID, because it can be picked up by hidraw driver.
OK, I applied th epatch to the 'next' branch, please send the blacklist patch to Jiri.
Petr, are you planning to send the blacklist entry patch?
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.
PATCH 1/1 HID: blacklist ET&T TC5UH touchscreen controller
In reply to Dmitry TorokhovThis patch adds ET&T TC5UH touchscreen controller to HID blacklist, because this device is handled by input/usbtouchscreen driver.
--- drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-)
drivers/hid/hid-core.c +1 -0
@@ -1296,6 +1296,7 @@ static const struct hid_device_id hid_blacklist[] = { { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) }, { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) }, { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) }, { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) }, { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },
drivers/hid/hid-ids.h +3 -0
@@ -164,6 +164,9 @@#define USB_VENDOR_ID_ESSENTIAL_REALITY 0x0d7f#define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100 +#define USB_VENDOR_ID_ETT 0x0664 +#define USB_DEVICE_ID_TC5UH 0x0309 +#define USB_VENDOR_ID_EZKEY 0x0518#define USB_DEVICE_ID_BTC_8193 0x0002
Signature · 6 lines
1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] HID: blacklist ET&T TC5UH touchscreen controller
Quoted 14 lines · Petr Štetiar
This patch adds ET&T TC5UH touchscreen controller to HID blacklist, because this device is handled by input/usbtouchscreen driver.
Signed-off-by Petr Štetiar <[email protected]>--- drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-)drivers/hid/hid-core.c +0
-0
drivers/hid/hid-core.c static const struct hid_device_id hid_blacklist[] = { · line 1299
Quoted 4 lines
drivers/hid/hid-core.c +1
-0@@ -1296,6 +1296,7 @@ static const struct hid_device_id hid_blacklist[] = { { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) }, { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) },
Hi Petr,
actually the entry should go into hid_ignore_list[], not hid_blacklist[].
hid_blacklist[] is for those drivers, for which there exists specialized driver on hid bus, different from generic HID driver.
usbtouch is completely separate driver that has nothing to do with hid bus, therefore we want the whole hid subsystem to completely ignore the device -- and that's what hid_ignore_list[] is for.
I have fixed it up and applied to my tree.
Thanks,
Signature · 8 lines
Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] HID: blacklist ET&T TC5UH touchscreen controller
Jiri Kosina <[email protected]> [2009-12-10 12:18:17]:
Hi,
Quoted 1 line
actually the entry should go into hid_ignore_list[], not hid_blacklist[].
d'oh. Ok.
Quoted 1 line
I have fixed it up and applied to my tree.
Thanks.
-- ynezz