Lines Matching full:app
174 struct mt_application *app);
175 static void mt_post_parse(struct mt_device *td, struct mt_application *app);
693 mt_store_field(hdev, app, \
699 unsigned long **bit, int *max, struct mt_application *app) in mt_touch_input_mapping() argument
711 app->mt_flags |= INPUT_MT_POINTER; in mt_touch_input_mapping()
717 app->buttons_count++; in mt_touch_input_mapping()
769 if (app->quirks & MT_QUIRK_HOVERING) { in mt_touch_input_mapping()
781 app->quirks |= MT_QUIRK_CONFIDENCE; in mt_touch_input_mapping()
783 if (app->quirks & MT_QUIRK_CONFIDENCE) in mt_touch_input_mapping()
799 app->touches_by_report++; in mt_touch_input_mapping()
802 if (!(app->quirks & MT_QUIRK_NO_AREA)) in mt_touch_input_mapping()
808 if (!(app->quirks & MT_QUIRK_NO_AREA)) { in mt_touch_input_mapping()
830 app->scantime = &field->value[usage->usage_index]; in mt_touch_input_mapping()
831 app->scantime_logical_max = field->logical_maximum; in mt_touch_input_mapping()
834 app->have_contact_count = true; in mt_touch_input_mapping()
835 app->raw_cc = &field->value[usage->usage_index]; in mt_touch_input_mapping()
867 if ((app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) && in mt_touch_input_mapping()
889 static int mt_compute_slot(struct mt_device *td, struct mt_application *app, in mt_compute_slot() argument
893 __s32 quirks = app->quirks; in mt_compute_slot()
899 return cypress_compute_slot(app, slot); in mt_compute_slot()
902 return app->num_received; in mt_compute_slot()
911 struct mt_application *app, in mt_release_pending_palms() argument
917 for_each_set_bit(slotnum, app->pending_palm_slots, td->maxcontacts) { in mt_release_pending_palms()
918 clear_bit(slotnum, app->pending_palm_slots); in mt_release_pending_palms()
936 static void mt_sync_frame(struct mt_device *td, struct mt_application *app, in mt_sync_frame() argument
939 if (app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) in mt_sync_frame()
940 input_event(input, EV_KEY, BTN_LEFT, app->left_button_state); in mt_sync_frame()
943 input_event(input, EV_MSC, MSC_TIMESTAMP, app->timestamp); in mt_sync_frame()
946 mt_release_pending_palms(td, app, input); in mt_sync_frame()
948 app->num_received = 0; in mt_sync_frame()
949 app->left_button_state = 0; in mt_sync_frame()
958 static int mt_compute_timestamp(struct mt_application *app, __s32 value) in mt_compute_timestamp() argument
960 long delta = value - app->prev_scantime; in mt_compute_timestamp()
961 unsigned long jdelta = jiffies_to_usecs(jiffies - app->jiffies); in mt_compute_timestamp()
963 app->jiffies = jiffies; in mt_compute_timestamp()
966 delta += app->scantime_logical_max; in mt_compute_timestamp()
975 return app->timestamp + delta; in mt_compute_timestamp()
989 struct mt_application *app, in mt_process_slot() argument
993 __s32 quirks = app->quirks; in mt_process_slot()
1005 app->num_received >= app->num_expected) in mt_process_slot()
1020 slotnum = mt_compute_slot(td, app, slot, input); in mt_process_slot()
1040 if (app->application == HID_GD_SYSTEM_MULTIAXIS) in mt_process_slot()
1056 set_bit(slotnum, app->pending_palm_slots); in mt_process_slot()
1116 struct mt_application *app, in mt_process_mt_event() argument
1122 __s32 quirks = app->quirks; in mt_process_mt_event()
1146 app->left_button_state |= value; in mt_process_mt_event()
1159 struct mt_application *app = rdata->application; in mt_touch_report() local
1173 scantime = *app->scantime; in mt_touch_report()
1174 app->timestamp = mt_compute_timestamp(app, scantime); in mt_touch_report()
1175 if (app->raw_cc != DEFAULT_ZERO) in mt_touch_report()
1176 contact_count = *app->raw_cc; in mt_touch_report()
1190 if ((app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) && in mt_touch_report()
1191 app->num_received == 0 && in mt_touch_report()
1192 app->prev_scantime != scantime) in mt_touch_report()
1193 app->num_expected = contact_count; in mt_touch_report()
1196 app->num_expected = contact_count; in mt_touch_report()
1198 app->prev_scantime = scantime; in mt_touch_report()
1200 first_packet = app->num_received == 0; in mt_touch_report()
1204 list_for_each_entry(slot, &app->mt_usages, list) { in mt_touch_report()
1205 if (!mt_process_slot(td, input, app, slot)) in mt_touch_report()
1206 app->num_received++; in mt_touch_report()
1217 mt_process_mt_event(hid, app, field, in mt_touch_report()
1222 if (app->num_received >= app->num_expected) in mt_touch_report()
1223 mt_sync_frame(td, app, input); in mt_touch_report()
1243 if (app->quirks & MT_QUIRK_STICKY_FINGERS) { in mt_touch_report()
1256 struct mt_application *app) in mt_touch_input_configured() argument
1266 mt_post_parse(td, app); in mt_touch_input_configured()
1268 mt_post_parse_default_settings(td, app); in mt_touch_input_configured()
1271 app->mt_flags |= INPUT_MT_POINTER; in mt_touch_input_configured()
1273 if (app->quirks & MT_QUIRK_NOT_SEEN_MEANS_UP) in mt_touch_input_configured()
1274 app->mt_flags |= INPUT_MT_DROP_UNUSED; in mt_touch_input_configured()
1277 if ((app->mt_flags & INPUT_MT_POINTER) && in mt_touch_input_configured()
1278 (app->buttons_count == 1)) in mt_touch_input_configured()
1284 app->pending_palm_slots = devm_kcalloc(&hi->input->dev, in mt_touch_input_configured()
1288 if (!app->pending_palm_slots) in mt_touch_input_configured()
1291 ret = input_mt_init_slots(input, td->maxcontacts, app->mt_flags); in mt_touch_input_configured()
1295 app->mt_flags = 0; in mt_touch_input_configured()
1531 struct mt_application *app) in mt_post_parse_default_settings() argument
1533 __s32 quirks = app->quirks; in mt_post_parse_default_settings()
1536 if (list_is_singular(&app->mt_usages)) { in mt_post_parse_default_settings()
1544 app->quirks = quirks; in mt_post_parse_default_settings()
1547 static void mt_post_parse(struct mt_device *td, struct mt_application *app) in mt_post_parse() argument
1549 if (!app->have_contact_count) in mt_post_parse()
1550 app->quirks &= ~MT_QUIRK_CONTACT_CNT_ACCURATE; in mt_post_parse()