>From 9eed7d30a560836a871d6a35c76a0ee3fc76d4a2 Mon Sep 17 00:00:00 2001 From: Shawn Landden Date: Thu, 23 Feb 2012 13:53:51 -0800 Subject: [PATCH] input: invert e2i touchscreen 180 degrees 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