Lines Matching full:app

173 					   struct mt_application *app);
174 static void mt_post_parse(struct mt_device *td, struct mt_application *app);
678 mt_store_field(hdev, app, \
684 unsigned long **bit, int *max, struct mt_application *app) in mt_touch_input_mapping() argument
696 app->mt_flags |= INPUT_MT_POINTER; in mt_touch_input_mapping()
702 app->buttons_count++; in mt_touch_input_mapping()
754 if (app->quirks & MT_QUIRK_HOVERING) { in mt_touch_input_mapping()
764 app->quirks |= MT_QUIRK_CONFIDENCE; in mt_touch_input_mapping()
766 if (app->quirks & MT_QUIRK_CONFIDENCE) in mt_touch_input_mapping()
782 app->touches_by_report++; in mt_touch_input_mapping()
785 if (!(app->quirks & MT_QUIRK_NO_AREA)) in mt_touch_input_mapping()
791 if (!(app->quirks & MT_QUIRK_NO_AREA)) { in mt_touch_input_mapping()
813 app->scantime = &field->value[usage->usage_index]; in mt_touch_input_mapping()
814 app->scantime_logical_max = field->logical_maximum; in mt_touch_input_mapping()
817 app->have_contact_count = true; in mt_touch_input_mapping()
818 app->raw_cc = &field->value[usage->usage_index]; in mt_touch_input_mapping()
850 if ((app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) && in mt_touch_input_mapping()
872 static int mt_compute_slot(struct mt_device *td, struct mt_application *app, in mt_compute_slot() argument
876 __s32 quirks = app->quirks; in mt_compute_slot()
882 return cypress_compute_slot(app, slot); in mt_compute_slot()
885 return app->num_received; in mt_compute_slot()
894 struct mt_application *app, in mt_release_pending_palms() argument
900 for_each_set_bit(slotnum, app->pending_palm_slots, td->maxcontacts) { in mt_release_pending_palms()
901 clear_bit(slotnum, app->pending_palm_slots); in mt_release_pending_palms()
919 static void mt_sync_frame(struct mt_device *td, struct mt_application *app, in mt_sync_frame() argument
922 if (app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) in mt_sync_frame()
923 input_event(input, EV_KEY, BTN_LEFT, app->left_button_state); in mt_sync_frame()
926 input_event(input, EV_MSC, MSC_TIMESTAMP, app->timestamp); in mt_sync_frame()
929 mt_release_pending_palms(td, app, input); in mt_sync_frame()
931 app->num_received = 0; in mt_sync_frame()
932 app->left_button_state = 0; in mt_sync_frame()
941 static int mt_compute_timestamp(struct mt_application *app, __s32 value) in mt_compute_timestamp() argument
943 long delta = value - app->prev_scantime; in mt_compute_timestamp()
944 unsigned long jdelta = jiffies_to_usecs(jiffies - app->jiffies); in mt_compute_timestamp()
946 app->jiffies = jiffies; in mt_compute_timestamp()
949 delta += app->scantime_logical_max; in mt_compute_timestamp()
958 return app->timestamp + delta; in mt_compute_timestamp()
972 struct mt_application *app, in mt_process_slot() argument
976 __s32 quirks = app->quirks; in mt_process_slot()
988 app->num_received >= app->num_expected) in mt_process_slot()
1003 slotnum = mt_compute_slot(td, app, slot, input); in mt_process_slot()
1023 if (app->application == HID_GD_SYSTEM_MULTIAXIS) in mt_process_slot()
1039 set_bit(slotnum, app->pending_palm_slots); in mt_process_slot()
1099 struct mt_application *app, in mt_process_mt_event() argument
1105 __s32 quirks = app->quirks; in mt_process_mt_event()
1129 app->left_button_state |= value; in mt_process_mt_event()
1142 struct mt_application *app = rdata->application; in mt_touch_report() local
1156 scantime = *app->scantime; in mt_touch_report()
1157 app->timestamp = mt_compute_timestamp(app, scantime); in mt_touch_report()
1158 if (app->raw_cc != DEFAULT_ZERO) in mt_touch_report()
1159 contact_count = *app->raw_cc; in mt_touch_report()
1173 if ((app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) && in mt_touch_report()
1174 app->num_received == 0 && in mt_touch_report()
1175 app->prev_scantime != scantime) in mt_touch_report()
1176 app->num_expected = contact_count; in mt_touch_report()
1179 app->num_expected = contact_count; in mt_touch_report()
1181 app->prev_scantime = scantime; in mt_touch_report()
1183 first_packet = app->num_received == 0; in mt_touch_report()
1187 list_for_each_entry(slot, &app->mt_usages, list) { in mt_touch_report()
1188 if (!mt_process_slot(td, input, app, slot)) in mt_touch_report()
1189 app->num_received++; in mt_touch_report()
1200 mt_process_mt_event(hid, app, field, in mt_touch_report()
1205 if (app->num_received >= app->num_expected) in mt_touch_report()
1206 mt_sync_frame(td, app, input); in mt_touch_report()
1226 if (app->quirks & MT_QUIRK_STICKY_FINGERS) { in mt_touch_report()
1239 struct mt_application *app) in mt_touch_input_configured() argument
1249 mt_post_parse(td, app); in mt_touch_input_configured()
1251 mt_post_parse_default_settings(td, app); in mt_touch_input_configured()
1254 app->mt_flags |= INPUT_MT_POINTER; in mt_touch_input_configured()
1256 if (app->quirks & MT_QUIRK_NOT_SEEN_MEANS_UP) in mt_touch_input_configured()
1257 app->mt_flags |= INPUT_MT_DROP_UNUSED; in mt_touch_input_configured()
1260 if ((app->mt_flags & INPUT_MT_POINTER) && in mt_touch_input_configured()
1261 (app->buttons_count == 1)) in mt_touch_input_configured()
1267 app->pending_palm_slots = devm_kcalloc(&hi->input->dev, in mt_touch_input_configured()
1271 if (!app->pending_palm_slots) in mt_touch_input_configured()
1274 ret = input_mt_init_slots(input, td->maxcontacts, app->mt_flags); in mt_touch_input_configured()
1278 app->mt_flags = 0; in mt_touch_input_configured()
1514 struct mt_application *app) in mt_post_parse_default_settings() argument
1516 __s32 quirks = app->quirks; in mt_post_parse_default_settings()
1519 if (list_is_singular(&app->mt_usages)) { in mt_post_parse_default_settings()
1527 app->quirks = quirks; in mt_post_parse_default_settings()
1530 static void mt_post_parse(struct mt_device *td, struct mt_application *app) in mt_post_parse() argument
1532 if (!app->have_contact_count) in mt_post_parse()
1533 app->quirks &= ~MT_QUIRK_CONTACT_CNT_ACCURATE; in mt_post_parse()