Lines Matching full:app
190 struct mt_application *app);
191 static void mt_post_parse(struct mt_device *td, struct mt_application *app);
747 mt_store_field(hdev, app, \
753 unsigned long **bit, int *max, struct mt_application *app) in mt_touch_input_mapping() argument
765 app->mt_flags |= INPUT_MT_POINTER; in mt_touch_input_mapping()
771 app->buttons_count++; in mt_touch_input_mapping()
823 if (app->quirks & MT_QUIRK_HOVERING) { in mt_touch_input_mapping()
836 app->quirks |= MT_QUIRK_CONFIDENCE; in mt_touch_input_mapping()
838 if (app->quirks & MT_QUIRK_CONFIDENCE) in mt_touch_input_mapping()
873 app->touches_by_report++; in mt_touch_input_mapping()
876 if (!(app->quirks & MT_QUIRK_NO_AREA)) in mt_touch_input_mapping()
882 if (!(app->quirks & MT_QUIRK_NO_AREA)) { in mt_touch_input_mapping()
907 app->scantime = &field->value[usage->usage_index]; in mt_touch_input_mapping()
908 app->scantime_logical_max = field->logical_maximum; in mt_touch_input_mapping()
911 app->have_contact_count = true; in mt_touch_input_mapping()
912 app->raw_cc = &field->value[usage->usage_index]; in mt_touch_input_mapping()
940 if ((app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) && in mt_touch_input_mapping()
962 static int mt_compute_slot(struct mt_device *td, struct mt_application *app, in mt_compute_slot() argument
966 __s32 quirks = app->quirks; in mt_compute_slot()
972 return cypress_compute_slot(app, slot); in mt_compute_slot()
975 return app->num_received; in mt_compute_slot()
984 struct mt_application *app, in mt_release_pending_palms() argument
990 for_each_set_bit(slotnum, app->pending_palm_slots, td->maxcontacts) { in mt_release_pending_palms()
991 clear_bit(slotnum, app->pending_palm_slots); in mt_release_pending_palms()
1010 static void mt_sync_frame(struct mt_device *td, struct mt_application *app, in mt_sync_frame() argument
1013 if (app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) in mt_sync_frame()
1014 input_event(input, EV_KEY, BTN_LEFT, app->left_button_state); in mt_sync_frame()
1017 input_event(input, EV_MSC, MSC_TIMESTAMP, app->timestamp); in mt_sync_frame()
1020 mt_release_pending_palms(td, app, input); in mt_sync_frame()
1022 app->num_received = 0; in mt_sync_frame()
1023 app->left_button_state = 0; in mt_sync_frame()
1028 static int mt_compute_timestamp(struct mt_application *app, __s32 value) in mt_compute_timestamp() argument
1030 long delta = value - app->prev_scantime; in mt_compute_timestamp()
1031 unsigned long jdelta = jiffies_to_usecs(jiffies - app->jiffies); in mt_compute_timestamp()
1033 app->jiffies = jiffies; in mt_compute_timestamp()
1036 delta += app->scantime_logical_max; in mt_compute_timestamp()
1045 return app->timestamp + delta; in mt_compute_timestamp()
1059 struct mt_application *app, in mt_process_slot() argument
1064 __s32 quirks = app->quirks; in mt_process_slot()
1076 app->num_received >= app->num_expected) in mt_process_slot()
1091 slotnum = mt_compute_slot(td, app, slot, input); in mt_process_slot()
1111 if (app->application == HID_GD_SYSTEM_MULTIAXIS) in mt_process_slot()
1127 set_bit(slotnum, app->pending_palm_slots); in mt_process_slot()
1212 struct mt_application *app, in mt_process_mt_event() argument
1218 __s32 quirks = app->quirks; in mt_process_mt_event()
1242 app->left_button_state |= value; in mt_process_mt_event()
1255 struct mt_application *app = rdata->application; in mt_touch_report() local
1269 scantime = *app->scantime; in mt_touch_report()
1270 app->timestamp = mt_compute_timestamp(app, scantime); in mt_touch_report()
1271 if (app->raw_cc != DEFAULT_ZERO) in mt_touch_report()
1272 contact_count = *app->raw_cc; in mt_touch_report()
1286 if ((app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) && in mt_touch_report()
1287 app->num_received == 0 && in mt_touch_report()
1288 app->prev_scantime != scantime) in mt_touch_report()
1289 app->num_expected = contact_count; in mt_touch_report()
1292 app->num_expected = contact_count; in mt_touch_report()
1294 app->prev_scantime = scantime; in mt_touch_report()
1296 first_packet = app->num_received == 0; in mt_touch_report()
1300 list_for_each_entry(slot, &app->mt_usages, list) { in mt_touch_report()
1301 if (!mt_process_slot(td, input, app, slot)) in mt_touch_report()
1302 app->num_received++; in mt_touch_report()
1313 mt_process_mt_event(hid, app, field, in mt_touch_report()
1318 if (app->num_received >= app->num_expected) in mt_touch_report()
1319 mt_sync_frame(td, app, input); in mt_touch_report()
1339 if (app->quirks & MT_QUIRK_STICKY_FINGERS) { in mt_touch_report()
1352 struct mt_application *app) in mt_touch_input_configured() argument
1369 mt_post_parse(td, app); in mt_touch_input_configured()
1371 mt_post_parse_default_settings(td, app); in mt_touch_input_configured()
1378 app->mt_flags |= INPUT_MT_DIRECT; in mt_touch_input_configured()
1381 app->mt_flags |= INPUT_MT_POINTER; in mt_touch_input_configured()
1384 app->mt_flags |= INPUT_MT_TOTAL_FORCE; in mt_touch_input_configured()
1386 if (app->quirks & MT_QUIRK_NOT_SEEN_MEANS_UP) in mt_touch_input_configured()
1387 app->mt_flags |= INPUT_MT_DROP_UNUSED; in mt_touch_input_configured()
1390 if ((app->mt_flags & INPUT_MT_POINTER) && in mt_touch_input_configured()
1391 (app->buttons_count == 1)) in mt_touch_input_configured()
1397 app->pending_palm_slots = devm_kcalloc(&hi->input->dev, in mt_touch_input_configured()
1401 if (!app->pending_palm_slots) in mt_touch_input_configured()
1404 ret = input_mt_init_slots(input, td->maxcontacts, app->mt_flags); in mt_touch_input_configured()
1408 app->mt_flags = 0; in mt_touch_input_configured()
1680 struct mt_application *app) in mt_post_parse_default_settings() argument
1682 __s32 quirks = app->quirks; in mt_post_parse_default_settings()
1685 if (list_is_singular(&app->mt_usages)) { in mt_post_parse_default_settings()
1693 app->quirks = quirks; in mt_post_parse_default_settings()
1696 static void mt_post_parse(struct mt_device *td, struct mt_application *app) in mt_post_parse() argument
1698 if (!app->have_contact_count) in mt_post_parse()
1699 app->quirks &= ~MT_QUIRK_CONTACT_CNT_ACCURATE; in mt_post_parse()