|
@@ -213,6 +213,16 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
|
|
|
struct mt_class *cls = td->mtclass;
|
|
|
__s32 quirks = cls->quirks;
|
|
|
|
|
|
+ /* Only map fields from TouchScreen or TouchPad collections.
|
|
|
+ * We need to ignore fields that belong to other collections
|
|
|
+ * such as Mouse that might have the same GenericDesktop usages. */
|
|
|
+ if (field->application == HID_DG_TOUCHSCREEN)
|
|
|
+ set_bit(INPUT_PROP_DIRECT, hi->input->propbit);
|
|
|
+ else if (field->application == HID_DG_TOUCHPAD)
|
|
|
+ set_bit(INPUT_PROP_POINTER, hi->input->propbit);
|
|
|
+ else
|
|
|
+ return 0;
|
|
|
+
|
|
|
switch (usage->hid & HID_USAGE_PAGE) {
|
|
|
|
|
|
case HID_UP_GENDESK:
|