Input: atmel_mxt_ts - initialise input slots with INPUT_MT_DIRECT
authorNick Dyer <nick.dyer@itdev.co.uk>
Tue, 4 Aug 2015 23:57:40 +0000 (16:57 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 5 Aug 2015 00:03:54 +0000 (17:03 -0700)
This indicates the device coordinates should be directly mapped to screen.
This is valid since scaling/flipping/rotation should be done by configuring
the MXT device.

It also flags to Android using INPUT_PROP_DIRECT that the device should be
treated as a touch screen by default, and removes the necessity for a
default IDC file.

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/atmel_mxt_ts.c

index d36da65f8c72b2c00c8d66405c767176da5072b3..0ea9903dde278af3d32fc9f464a96287cbca3ab3 100644 (file)
@@ -1858,6 +1858,8 @@ static int mxt_initialize_input_device(struct mxt_data *data)
        if (pdata->t19_num_keys) {
                mxt_set_up_as_touchpad(input_dev, data);
                mt_flags |= INPUT_MT_POINTER;
+       } else {
+               mt_flags |= INPUT_MT_DIRECT;
        }
 
        /* For multi touch */