[PATCH] input: invert e2i touchscreen 180 degrees
From: Shawn Landden
Date: Thu Feb 23 2012 - 16:53:51 EST
The Mimo 720 has its input rotated 180 degrees.
almost certainly brakes Mimo 730
---
drivers/input/touchscreen/usbtouchscreen.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index 3a5ebf4..c328389 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -271,8 +271,8 @@ static int e2i_init(struct usbtouch_usb *usbtouch)
static int e2i_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
{
int tmp = (pkt[0] << 8) | pkt[1];
- dev->x = (pkt[2] << 8) | pkt[3];
- dev->y = (pkt[4] << 8) | pkt[5];
+ dev->x = 0x7fff - ((pkt[2] << 8) | pkt[3]);
+ dev->y = 0x7fff - ((pkt[4] << 8) | pkt[5]);
tmp = tmp - 0xA000;
dev->touch = (tmp > 0);
--
1.7.5.4
--=-cDhA0ime3GChtNaqnC1C--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/