* patch for Dell ST220T Touch Screen Monitor
@ 2011-10-17 4:47 Gopal
2011-10-17 7:08 ` Benjamin Tissoires
0 siblings, 1 reply; 3+ messages in thread
From: Gopal @ 2011-10-17 4:47 UTC (permalink / raw)
To: Dmitry Torokhov, Glenn Sommer, gopal, linux-input, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 309 bytes --]
Hello Everybody,
We have recently created Support for Dell ST2220T Touch screen monitor
with in the kernel hierarchy driver/input/touchscreen patch for this
attach with this mail.
Please find the attachment. I have previously also send the patch didn't
got any feedback so sending it again.
thanks
Gopal
[-- Attachment #2: 0001-We-have-created-Support-for-DELL-ST2220T-TochScreen-.patch --]
[-- Type: text/plain, Size: 4162 bytes --]
>From 9f4e8d811c1b9fc9552f243fb1d577b2cc67553f Mon Sep 17 00:00:00 2001
From: gopal <gtiwari@redhat.com>
Date: Tue, 9 Aug 2011 15:15:51 +0530
Subject: [PATCH] We have created Support for DELL-ST2220T TochScreen Monitor
Signed-off-by: gopal <gtiwari@redhat.com>
---
drivers/input/touchscreen/usbtouchscreen.c | 99 +++++++++++++++++++++++++++-
1 files changed, 98 insertions(+), 1 deletions(-)
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 73fd664..beef39f 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -59,6 +59,8 @@
#define DRIVER_AUTHOR "Daniel Ritz <daniel.ritz@gmx.ch>"
#define DRIVER_DESC "USB Touchscreen Driver"
+#define CONFIG_TOUCHSCREEN_USB_DELL_ST2220T
+
static int swap_xy;
module_param(swap_xy, bool, 0644);
MODULE_PARM_DESC(swap_xy, "If set X and Y axes are swapped.");
@@ -138,6 +140,7 @@ enum {
DEVTYPE_ZYTRONIC,
DEVTYPE_TC45USB,
DEVTYPE_NEXIO,
+ DEVTYPE_DELL_ST2220T,
};
#define USB_DEVICE_HID_CLASS(vend, prod) \
@@ -238,6 +241,10 @@ static const struct usb_device_id usbtouch_devices[] = {
{USB_DEVICE_AND_INTERFACE_INFO(0x1870, 0x0001, 0x0a, 0x00, 0x00),
.driver_info = DEVTYPE_NEXIO},
#endif
+#ifdef CONFIG_TOUCHSCREEN_USB_DELL_ST2220T
+/*Dell-st2220t*/
+{USB_DEVICE(0x1fd2, 0x0064), .driver_info = DEVTYPE_DELL_ST2220T},
+#endif
{}
};
@@ -335,6 +342,84 @@ static int panjit_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
}
#endif
+/*****************************************************************************
+* Dell-ST2220T
+*/
+#ifdef CONFIG_TOUCHSCREEN_USB_DELL_ST2220T
+#define ST2220T_VENDOR_REQ 0x22
+static int st2220t_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
+{
+ if (pkt[9] != 0xff && pkt[11]) {
+ dev->x = (pkt[10] << 8) | pkt[9];
+ dev->y = (pkt[12] << 8) | pkt[11];
+ dev->x = ((dev->x) * 9) - 0x200;
+ dev->y = (dev->y) * 15;
+ input_report_abs(dev->input, ABS_X, dev->x)
+ input_report_abs(dev->input, ABS_Y, dev->y);
+ }
+ dev->x = (pkt[4] << 8) | pkt[3];
+ dev->y = (pkt[6] << 8) | pkt[5];
+ dev->x = ((dev->x) * 9) - 0x200;
+ dev->y = (dev->y) * 15;
+ return 1;
+}
+
+static int st2220t_init(struct usbtouch_usb *usbtouch)
+{
+ int ret, i;
+ struct usb_device *udev = interface_to_usbdev(usbtouch->interface);
+ char *ctrl_buf;
+
+ /*Allocate Memory For Control transfer Buffer */
+
+ ctrl_buf = kmalloc(64, GFP_KERNEL);
+ if (ctrl_buf == NULL) {
+ dbg("%s - Failed : to Get Memory",
+ __func__);
+ return -1;
+ }
+
+ /* Following Control Request is Very Imp
+ To Start USB Interrupt transaction
+ this request is SET_REPORT H->D with Data as 07,02,02 */
+
+ ctrl_buf[0] = 0x07;
+ ctrl_buf[1] = 0x02;
+ ctrl_buf[2] = 0x02;
+ for (i = 0; i < 3; i++) {
+ ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x09,
+ 0x21, 0x0307, 0x00, ctrl_buf,
+ 0x03, USB_CTRL_SET_TIMEOUT);
+ dbg("%s - usb_control_msg - 0x21 0x09 - bytes|err: %d\n",
+ __func__, ret);
+
+ if (ret == 0)
+ break;
+ msleep(150);
+ }
+
+ if (ret < 0) {
+ dbg("%s - Failed to Initialize the DELL-ST2220 Touch Monitor\n",
+ __func__);
+ return -1;
+ }
+
+ msleep(150);
+ for (i = 0; i < 6; i++) {
+ ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
+ 0x01, 0xA1, 0x308, 0x00, ctrl_buf, 2,
+ USB_CTRL_SET_TIMEOUT);
+
+ dbg("%s - usb_control_msg - bytes|err: %d",
+ __func__, ret);
+ dbg(" %x %x\n", ctrl_buf[0], ctrl_buf[1]);
+ msleep(50);
+ }
+
+ kfree(ctrl_buf);
+ return 0;
+}
+#endif
/*****************************************************************************
* 3M/Microtouch Part
@@ -1139,8 +1224,20 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
.exit = nexio_exit,
},
#endif
-};
+#ifdef CONFIG_TOUCHSCREEN_USB_DELL_ST2220T
+
+ [DEVTYPE_DELL_ST2220T] = {
+ .min_xc = 0x0,
+ .max_xc = 0x4000,
+ .min_yc = 0x0,
+ .max_yc = 0x4000,
+ .rept_size = 0x0e,
+ .read_data = st2220t_read_data,
+ .init = st2220t_init,
+ },
+#endif
+};
/*****************************************************************************
* Generic Part
--
1.7.6
[-- Attachment #3: 0001-Blacklist-the-ST2220T-from-the-hid-core-so-as-to-get.patch --]
[-- Type: text/plain, Size: 1433 bytes --]
>From 5ef1836407a6c44f889a64e9935069f3820f4e3e Mon Sep 17 00:00:00 2001
From: gopal <gtiwari@redhat.com>
Date: Mon, 17 Oct 2011 10:06:50 +0530
Subject: [PATCH] Blacklist the ST2220T from the hid core so as to get the
driver access from the driver/input/touchscreen hierarchy
Signed-off-by: gopal <gtiwari@redhat.com>
---
drivers/hid/hid-core.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 242353d..00a8b3a 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1511,6 +1511,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0005) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ZYDACRON, USB_DEVICE_ID_ZYDACRON_REMOTE_CONTROL) },
+ { HID_USB_DEVICE(0x1fd2, 0x0064) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE) },
@@ -1894,6 +1895,7 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
+ { HID_USB_DEVICE(0x1fd2, 0x0064) },
{ }
};
--
1.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: patch for Dell ST220T Touch Screen Monitor
2011-10-17 4:47 patch for Dell ST220T Touch Screen Monitor Gopal
@ 2011-10-17 7:08 ` Benjamin Tissoires
2011-10-17 7:54 ` Gopal
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Tissoires @ 2011-10-17 7:08 UTC (permalink / raw)
To: Gopal; +Cc: Dmitry Torokhov, Glenn Sommer, linux-input, linux-kernel,
Jiri Kosina
Hi Gopal,
well, the device 0x1fd2:0x0064 is already supported by hid-multitouch
since mid-August. It has been included in the for-next branch of
Jiri's tree (see
http://git.kernel.org/?p=linux/kernel/git/jikos/hid.git;a=commit;h=c50bb1a4005630f47b5da26336f74a485033a515
).
As the device is a standard (Win7 compatible) hid multitouch device,
it's better to handle it that way: you'll get multitouch support and
there will be no cost to maintain it ;-)
Cheers,
Benjamin
On Mon, Oct 17, 2011 at 06:47, Gopal <gtiwari@redhat.com> wrote:
> Hello Everybody,
>
> We have recently created Support for Dell ST2220T Touch screen monitor with
> in the kernel hierarchy driver/input/touchscreen patch for this attach with
> this mail.
> Please find the attachment. I have previously also send the patch didn't got
> any feedback so sending it again.
>
> thanks
> Gopal
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: patch for Dell ST220T Touch Screen Monitor
2011-10-17 7:08 ` Benjamin Tissoires
@ 2011-10-17 7:54 ` Gopal
0 siblings, 0 replies; 3+ messages in thread
From: Gopal @ 2011-10-17 7:54 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Dmitry Torokhov, Glenn Sommer, linux-input, linux-kernel,
Jiri Kosina
Hi Benjamin,
Thanks for Informing...I think i have missed by some day may be. But i
have fwded my patch some where around 9th Aug. 2011 also but didn't got
any feedback on that so tried again.
thanks for informing.
gopal.
On 10/17/2011 12:38 PM, Benjamin Tissoires wrote:
> Hi Gopal,
>
> well, the device 0x1fd2:0x0064 is already supported by hid-multitouch
> since mid-August. It has been included in the for-next branch of
> Jiri's tree (see
> http://git.kernel.org/?p=linux/kernel/git/jikos/hid.git;a=commit;h=c50bb1a4005630f47b5da26336f74a485033a515
> ).
>
> As the device is a standard (Win7 compatible) hid multitouch device,
> it's better to handle it that way: you'll get multitouch support and
> there will be no cost to maintain it ;-)
>
> Cheers,
> Benjamin
>
> On Mon, Oct 17, 2011 at 06:47, Gopal<gtiwari@redhat.com> wrote:
>> Hello Everybody,
>>
>> We have recently created Support for Dell ST2220T Touch screen monitor with
>> in the kernel hierarchy driver/input/touchscreen patch for this attach with
>> this mail.
>> Please find the attachment. I have previously also send the patch didn't got
>> any feedback so sending it again.
>>
>> thanks
>> Gopal
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-17 7:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-17 4:47 patch for Dell ST220T Touch Screen Monitor Gopal
2011-10-17 7:08 ` Benjamin Tissoires
2011-10-17 7:54 ` Gopal
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).