Lines Matching full:app
174 struct mt_application *app);
175 static void mt_post_parse(struct mt_device *td, struct mt_application *app);
711 mt_store_field(hdev, app, \
717 unsigned long **bit, int *max, struct mt_application *app) in mt_touch_input_mapping() argument
729 app->mt_flags |= INPUT_MT_POINTER; in mt_touch_input_mapping()
735 app->buttons_count++; in mt_touch_input_mapping()
787 if (app->quirks & MT_QUIRK_HOVERING) { in mt_touch_input_mapping()
800 app->quirks |= MT_QUIRK_CONFIDENCE; in mt_touch_input_mapping()
802 if (app->quirks & MT_QUIRK_CONFIDENCE) in mt_touch_input_mapping()
818 app->touches_by_report++; in mt_touch_input_mapping()
821 if (!(app->quirks & MT_QUIRK_NO_AREA)) in mt_touch_input_mapping()
827 if (!(app->quirks & MT_QUIRK_NO_AREA)) { in mt_touch_input_mapping()
849 app->scantime = &field->value[usage->usage_index]; in mt_touch_input_mapping()
850 app->scantime_logical_max = field->logical_maximum; in mt_touch_input_mapping()
853 app->have_contact_count = true; in mt_touch_input_mapping()
854 app->raw_cc = &field->value[usage->usage_index]; in mt_touch_input_mapping()
886 if ((app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) && in mt_touch_input_mapping()
908 static int mt_compute_slot(struct mt_device *td, struct mt_application *app, in mt_compute_slot() argument
912 __s32 quirks = app->quirks; in mt_compute_slot()
918 return cypress_compute_slot(app, slot); in mt_compute_slot()
921 return app->num_received; in mt_compute_slot()
930 struct mt_application *app, in mt_release_pending_palms() argument
936 for_each_set_bit(slotnum, app->pending_palm_slots, td->maxcontacts) { in mt_release_pending_palms()
937 clear_bit(slotnum, app->pending_palm_slots); in mt_release_pending_palms()
955 static void mt_sync_frame(struct mt_device *td, struct mt_application *app, in mt_sync_frame() argument
958 if (app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) in mt_sync_frame()
959 input_event(input, EV_KEY, BTN_LEFT, app->left_button_state); in mt_sync_frame()
962 input_event(input, EV_MSC, MSC_TIMESTAMP, app->timestamp); in mt_sync_frame()
965 mt_release_pending_palms(td, app, input); in mt_sync_frame()
967 app->num_received = 0; in mt_sync_frame()
968 app->left_button_state = 0; in mt_sync_frame()
977 static int mt_compute_timestamp(struct mt_application *app, __s32 value) in mt_compute_timestamp() argument
979 long delta = value - app->prev_scantime; in mt_compute_timestamp()
980 unsigned long jdelta = jiffies_to_usecs(jiffies - app->jiffies); in mt_compute_timestamp()
982 app->jiffies = jiffies; in mt_compute_timestamp()
985 delta += app->scantime_logical_max; in mt_compute_timestamp()
994 return app->timestamp + delta; in mt_compute_timestamp()
1008 struct mt_application *app, in mt_process_slot() argument
1012 __s32 quirks = app->quirks; in mt_process_slot()
1024 app->num_received >= app->num_expected) in mt_process_slot()
1039 slotnum = mt_compute_slot(td, app, slot, input); in mt_process_slot()
1059 if (app->application == HID_GD_SYSTEM_MULTIAXIS) in mt_process_slot()
1075 set_bit(slotnum, app->pending_palm_slots); in mt_process_slot()
1135 struct mt_application *app, in mt_process_mt_event() argument
1141 __s32 quirks = app->quirks; in mt_process_mt_event()
1165 app->left_button_state |= value; in mt_process_mt_event()
1178 struct mt_application *app = rdata->application; in mt_touch_report() local
1192 scantime = *app->scantime; in mt_touch_report()
1193 app->timestamp = mt_compute_timestamp(app, scantime); in mt_touch_report()
1194 if (app->raw_cc != DEFAULT_ZERO) in mt_touch_report()
1195 contact_count = *app->raw_cc; in mt_touch_report()
1209 if ((app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) && in mt_touch_report()
1210 app->num_received == 0 && in mt_touch_report()
1211 app->prev_scantime != scantime) in mt_touch_report()
1212 app->num_expected = contact_count; in mt_touch_report()
1215 app->num_expected = contact_count; in mt_touch_report()
1217 app->prev_scantime = scantime; in mt_touch_report()
1219 first_packet = app->num_received == 0; in mt_touch_report()
1223 list_for_each_entry(slot, &app->mt_usages, list) { in mt_touch_report()
1224 if (!mt_process_slot(td, input, app, slot)) in mt_touch_report()
1225 app->num_received++; in mt_touch_report()
1236 mt_process_mt_event(hid, app, field, in mt_touch_report()
1241 if (app->num_received >= app->num_expected) in mt_touch_report()
1242 mt_sync_frame(td, app, input); in mt_touch_report()
1262 if (app->quirks & MT_QUIRK_STICKY_FINGERS) { in mt_touch_report()
1275 struct mt_application *app) in mt_touch_input_configured() argument
1285 mt_post_parse(td, app); in mt_touch_input_configured()
1287 mt_post_parse_default_settings(td, app); in mt_touch_input_configured()
1290 app->mt_flags |= INPUT_MT_POINTER; in mt_touch_input_configured()
1292 if (app->quirks & MT_QUIRK_NOT_SEEN_MEANS_UP) in mt_touch_input_configured()
1293 app->mt_flags |= INPUT_MT_DROP_UNUSED; in mt_touch_input_configured()
1296 if ((app->mt_flags & INPUT_MT_POINTER) && in mt_touch_input_configured()
1297 (app->buttons_count == 1)) in mt_touch_input_configured()
1303 app->pending_palm_slots = devm_kcalloc(&hi->input->dev, in mt_touch_input_configured()
1307 if (!app->pending_palm_slots) in mt_touch_input_configured()
1310 ret = input_mt_init_slots(input, td->maxcontacts, app->mt_flags); in mt_touch_input_configured()
1314 app->mt_flags = 0; in mt_touch_input_configured()
1550 struct mt_application *app) in mt_post_parse_default_settings() argument
1552 __s32 quirks = app->quirks; in mt_post_parse_default_settings()
1555 if (list_is_singular(&app->mt_usages)) { in mt_post_parse_default_settings()
1563 app->quirks = quirks; in mt_post_parse_default_settings()
1566 static void mt_post_parse(struct mt_device *td, struct mt_application *app) in mt_post_parse() argument
1568 if (!app->have_contact_count) in mt_post_parse()
1569 app->quirks &= ~MT_QUIRK_CONTACT_CNT_ACCURATE; in mt_post_parse()