I just got a Mimo 720 usb-only touchscreen. using module "usbtouchscreen" The x and y are rotated 180 deg. While I initially thought the touch device used by usbtouchscreen.c was 17e9:401a, it turns out it is is 1ac7:0001, which matches it's controller, but is a problem as this may be the only model where x any y are 180 deg off. The module has an option to rotate 90 deg, and with a 180 deg rotation parameter we could support all possible rotations from mis-installations (if that is what this is). Would it make sense to add a parameter to flip a usbtouchscreen 180 deg, and if so, should that setting apply to every (or most) displays in the module, or just this one where there is a backwards implamentations? I see that some touchscreens already invert one or both of their axis' from the input. Inc. patch that inverts _all_ e2i touchscreens. I came across this on 3.2.2 computer information: https://bugzilla.kernel.org/show_bug.cgi?id=42743
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 73fd664..a9f2303 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -265,8 +265,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);