Lines Matching refs:app

183 					   struct mt_application *app);
184 static void mt_post_parse(struct mt_device *td, struct mt_application *app);
738 mt_store_field(hdev, app, \
744 unsigned long **bit, int *max, struct mt_application *app) in mt_touch_input_mapping() argument
756 app->mt_flags |= INPUT_MT_POINTER; in mt_touch_input_mapping()
762 app->buttons_count++; in mt_touch_input_mapping()
814 if (app->quirks & MT_QUIRK_HOVERING) { in mt_touch_input_mapping()
827 app->quirks |= MT_QUIRK_CONFIDENCE; in mt_touch_input_mapping()
829 if (app->quirks & MT_QUIRK_CONFIDENCE) in mt_touch_input_mapping()
864 app->touches_by_report++; in mt_touch_input_mapping()
867 if (!(app->quirks & MT_QUIRK_NO_AREA)) in mt_touch_input_mapping()
873 if (!(app->quirks & MT_QUIRK_NO_AREA)) { in mt_touch_input_mapping()
895 app->scantime = &field->value[usage->usage_index]; in mt_touch_input_mapping()
896 app->scantime_logical_max = field->logical_maximum; in mt_touch_input_mapping()
899 app->have_contact_count = true; in mt_touch_input_mapping()
900 app->raw_cc = &field->value[usage->usage_index]; in mt_touch_input_mapping()
928 if ((app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) && in mt_touch_input_mapping()
950 static int mt_compute_slot(struct mt_device *td, struct mt_application *app, in mt_compute_slot() argument
954 __s32 quirks = app->quirks; in mt_compute_slot()
960 return cypress_compute_slot(app, slot); in mt_compute_slot()
963 return app->num_received; in mt_compute_slot()
972 struct mt_application *app, in mt_release_pending_palms() argument
978 for_each_set_bit(slotnum, app->pending_palm_slots, td->maxcontacts) { in mt_release_pending_palms()
979 clear_bit(slotnum, app->pending_palm_slots); in mt_release_pending_palms()
997 static void mt_sync_frame(struct mt_device *td, struct mt_application *app, in mt_sync_frame() argument
1000 if (app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) in mt_sync_frame()
1001 input_event(input, EV_KEY, BTN_LEFT, app->left_button_state); in mt_sync_frame()
1004 input_event(input, EV_MSC, MSC_TIMESTAMP, app->timestamp); in mt_sync_frame()
1007 mt_release_pending_palms(td, app, input); in mt_sync_frame()
1009 app->num_received = 0; in mt_sync_frame()
1010 app->left_button_state = 0; in mt_sync_frame()
1019 static int mt_compute_timestamp(struct mt_application *app, __s32 value) in mt_compute_timestamp() argument
1021 long delta = value - app->prev_scantime; in mt_compute_timestamp()
1022 unsigned long jdelta = jiffies_to_usecs(jiffies - app->jiffies); in mt_compute_timestamp()
1024 app->jiffies = jiffies; in mt_compute_timestamp()
1027 delta += app->scantime_logical_max; in mt_compute_timestamp()
1036 return app->timestamp + delta; in mt_compute_timestamp()
1050 struct mt_application *app, in mt_process_slot() argument
1055 __s32 quirks = app->quirks; in mt_process_slot()
1067 app->num_received >= app->num_expected) in mt_process_slot()
1082 slotnum = mt_compute_slot(td, app, slot, input); in mt_process_slot()
1102 if (app->application == HID_GD_SYSTEM_MULTIAXIS) in mt_process_slot()
1118 set_bit(slotnum, app->pending_palm_slots); in mt_process_slot()
1198 struct mt_application *app, in mt_process_mt_event() argument
1204 __s32 quirks = app->quirks; in mt_process_mt_event()
1228 app->left_button_state |= value; in mt_process_mt_event()
1241 struct mt_application *app = rdata->application; in mt_touch_report() local
1255 scantime = *app->scantime; in mt_touch_report()
1256 app->timestamp = mt_compute_timestamp(app, scantime); in mt_touch_report()
1257 if (app->raw_cc != DEFAULT_ZERO) in mt_touch_report()
1258 contact_count = *app->raw_cc; in mt_touch_report()
1272 if ((app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) && in mt_touch_report()
1273 app->num_received == 0 && in mt_touch_report()
1274 app->prev_scantime != scantime) in mt_touch_report()
1275 app->num_expected = contact_count; in mt_touch_report()
1278 app->num_expected = contact_count; in mt_touch_report()
1280 app->prev_scantime = scantime; in mt_touch_report()
1282 first_packet = app->num_received == 0; in mt_touch_report()
1286 list_for_each_entry(slot, &app->mt_usages, list) { in mt_touch_report()
1287 if (!mt_process_slot(td, input, app, slot)) in mt_touch_report()
1288 app->num_received++; in mt_touch_report()
1299 mt_process_mt_event(hid, app, field, in mt_touch_report()
1304 if (app->num_received >= app->num_expected) in mt_touch_report()
1305 mt_sync_frame(td, app, input); in mt_touch_report()
1325 if (app->quirks & MT_QUIRK_STICKY_FINGERS) { in mt_touch_report()
1338 struct mt_application *app) in mt_touch_input_configured() argument
1355 mt_post_parse(td, app); in mt_touch_input_configured()
1357 mt_post_parse_default_settings(td, app); in mt_touch_input_configured()
1364 app->mt_flags |= INPUT_MT_DIRECT; in mt_touch_input_configured()
1367 app->mt_flags |= INPUT_MT_POINTER; in mt_touch_input_configured()
1369 if (app->quirks & MT_QUIRK_NOT_SEEN_MEANS_UP) in mt_touch_input_configured()
1370 app->mt_flags |= INPUT_MT_DROP_UNUSED; in mt_touch_input_configured()
1373 if ((app->mt_flags & INPUT_MT_POINTER) && in mt_touch_input_configured()
1374 (app->buttons_count == 1)) in mt_touch_input_configured()
1380 app->pending_palm_slots = devm_kcalloc(&hi->input->dev, in mt_touch_input_configured()
1384 if (!app->pending_palm_slots) in mt_touch_input_configured()
1387 ret = input_mt_init_slots(input, td->maxcontacts, app->mt_flags); in mt_touch_input_configured()
1391 app->mt_flags = 0; in mt_touch_input_configured()
1649 struct mt_application *app) in mt_post_parse_default_settings() argument
1651 __s32 quirks = app->quirks; in mt_post_parse_default_settings()
1654 if (list_is_singular(&app->mt_usages)) { in mt_post_parse_default_settings()
1662 app->quirks = quirks; in mt_post_parse_default_settings()
1665 static void mt_post_parse(struct mt_device *td, struct mt_application *app) in mt_post_parse() argument
1667 if (!app->have_contact_count) in mt_post_parse()
1668 app->quirks &= ~MT_QUIRK_CONTACT_CNT_ACCURATE; in mt_post_parse()