Skip to contentSkip to conversation

usbtouchscreen: support bigger iNexio touchscreens

PATCH Ondrej Zary 2 participants 2 messages Mar 16, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Bigger Nexio touchscreens not only send more data but also the header values are modified somehow. Fix the header somehow (it's a guesswork but it works at least on one 46" touchscreen with 2.00SMS firmware) and also increase rept_size.

drivers/input/touchscreen/usbtouchscreen.c +6 -1
@@ -858,6 +858,11 @@
 	if ((pkt[0] & 0xe0) != 0xe0)
 		return 0;
 
+	if (be16_to_cpu(packet->data_len) > 0xff)
+		packet->data_len = cpu_to_be16(be16_to_cpu(packet->data_len) - 0x100);
+	if (be16_to_cpu(packet->x_len) > 0xff)
+		packet->x_len = cpu_to_be16(be16_to_cpu(packet->x_len) - 0x80);
+
 	/* send ACK */
 	ret = usb_submit_urb(priv->ack, GFP_ATOMIC);
 
@@ -1113,7 +1118,7 @@
 
 #ifdef CONFIG_TOUCHSCREEN_USB_NEXIO
 	[DEVTYPE_NEXIO] = {
-		.rept_size	= 128,
+		.rept_size	= 1024,
 		.irq_always	= true,
 		.read_data	= nexio_read_data,
 		.init		= nexio_init,
Signature · 1 line
Ondrej Zary
#1 lore raw

[ adding some more relevant CCs ]

Quoted 33 lines · Ondrej Zary

Bigger Nexio touchscreens not only send more data but also the header values are modified somehow. Fix the header somehow (it's a guesswork but it works at least on one 46" touchscreen with 2.00SMS firmware) and also increase rept_size.

drivers/input/touchscreen/usbtouchscreen.c +6 -1
@@ -858,6 +858,11 @@
 	if ((pkt[0] & 0xe0) != 0xe0)
 		return 0;
 
+	if (be16_to_cpu(packet->data_len) > 0xff)
+		packet->data_len = cpu_to_be16(be16_to_cpu(packet->data_len) - 0x100);
+	if (be16_to_cpu(packet->x_len) > 0xff)
+		packet->x_len = cpu_to_be16(be16_to_cpu(packet->x_len) - 0x80);
+
 	/* send ACK */
 	ret = usb_submit_urb(priv->ack, GFP_ATOMIC);
 
@@ -1113,7 +1118,7 @@
 
 #ifdef CONFIG_TOUCHSCREEN_USB_NEXIO
 	[DEVTYPE_NEXIO] = {
-		.rept_size	= 128,
+		.rept_size	= 1024,
 		.irq_always	= true,
 		.read_data	= nexio_read_data,
 		.init		= nexio_init,
Signature · 7 lines
Jiri Kosina
SUSE Labs, Novell Inc.

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html