• Home
  • Raw
  • Download

Lines Matching refs:app

173 					   struct mt_application *app);
174 static void mt_post_parse(struct mt_device *td, struct mt_application *app);
682 mt_store_field(hdev, app, \
688 unsigned long **bit, int *max, struct mt_application *app) in mt_touch_input_mapping() argument
700 app->mt_flags |= INPUT_MT_POINTER; in mt_touch_input_mapping()
706 app->buttons_count++; in mt_touch_input_mapping()
758 if (app->quirks & MT_QUIRK_HOVERING) { in mt_touch_input_mapping()
769 app->quirks |= MT_QUIRK_CONFIDENCE; in mt_touch_input_mapping()
771 if (app->quirks & MT_QUIRK_CONFIDENCE) in mt_touch_input_mapping()
787 app->touches_by_report++; in mt_touch_input_mapping()
790 if (!(app->quirks & MT_QUIRK_NO_AREA)) in mt_touch_input_mapping()
796 if (!(app->quirks & MT_QUIRK_NO_AREA)) { in mt_touch_input_mapping()
818 app->scantime = &field->value[usage->usage_index]; in mt_touch_input_mapping()
819 app->scantime_logical_max = field->logical_maximum; in mt_touch_input_mapping()
822 app->have_contact_count = true; in mt_touch_input_mapping()
823 app->raw_cc = &field->value[usage->usage_index]; in mt_touch_input_mapping()
855 if ((app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) && in mt_touch_input_mapping()
877 static int mt_compute_slot(struct mt_device *td, struct mt_application *app, in mt_compute_slot() argument
881 __s32 quirks = app->quirks; in mt_compute_slot()
887 return cypress_compute_slot(app, slot); in mt_compute_slot()
890 return app->num_received; in mt_compute_slot()
899 struct mt_application *app, in mt_release_pending_palms() argument
905 for_each_set_bit(slotnum, app->pending_palm_slots, td->maxcontacts) { in mt_release_pending_palms()
906 clear_bit(slotnum, app->pending_palm_slots); in mt_release_pending_palms()
924 static void mt_sync_frame(struct mt_device *td, struct mt_application *app, in mt_sync_frame() argument
927 if (app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) in mt_sync_frame()
928 input_event(input, EV_KEY, BTN_LEFT, app->left_button_state); in mt_sync_frame()
931 input_event(input, EV_MSC, MSC_TIMESTAMP, app->timestamp); in mt_sync_frame()
934 mt_release_pending_palms(td, app, input); in mt_sync_frame()
936 app->num_received = 0; in mt_sync_frame()
937 app->left_button_state = 0; in mt_sync_frame()
946 static int mt_compute_timestamp(struct mt_application *app, __s32 value) in mt_compute_timestamp() argument
948 long delta = value - app->prev_scantime; in mt_compute_timestamp()
949 unsigned long jdelta = jiffies_to_usecs(jiffies - app->jiffies); in mt_compute_timestamp()
951 app->jiffies = jiffies; in mt_compute_timestamp()
954 delta += app->scantime_logical_max; in mt_compute_timestamp()
963 return app->timestamp + delta; in mt_compute_timestamp()
977 struct mt_application *app, in mt_process_slot() argument
981 __s32 quirks = app->quirks; in mt_process_slot()
993 app->num_received >= app->num_expected) in mt_process_slot()
1008 slotnum = mt_compute_slot(td, app, slot, input); in mt_process_slot()
1028 if (app->application == HID_GD_SYSTEM_MULTIAXIS) in mt_process_slot()
1044 set_bit(slotnum, app->pending_palm_slots); in mt_process_slot()
1104 struct mt_application *app, in mt_process_mt_event() argument
1110 __s32 quirks = app->quirks; in mt_process_mt_event()
1134 app->left_button_state |= value; in mt_process_mt_event()
1147 struct mt_application *app = rdata->application; in mt_touch_report() local
1161 scantime = *app->scantime; in mt_touch_report()
1162 app->timestamp = mt_compute_timestamp(app, scantime); in mt_touch_report()
1163 if (app->raw_cc != DEFAULT_ZERO) in mt_touch_report()
1164 contact_count = *app->raw_cc; in mt_touch_report()
1178 if ((app->quirks & MT_QUIRK_WIN8_PTP_BUTTONS) && in mt_touch_report()
1179 app->num_received == 0 && in mt_touch_report()
1180 app->prev_scantime != scantime) in mt_touch_report()
1181 app->num_expected = contact_count; in mt_touch_report()
1184 app->num_expected = contact_count; in mt_touch_report()
1186 app->prev_scantime = scantime; in mt_touch_report()
1188 first_packet = app->num_received == 0; in mt_touch_report()
1192 list_for_each_entry(slot, &app->mt_usages, list) { in mt_touch_report()
1193 if (!mt_process_slot(td, input, app, slot)) in mt_touch_report()
1194 app->num_received++; in mt_touch_report()
1205 mt_process_mt_event(hid, app, field, in mt_touch_report()
1210 if (app->num_received >= app->num_expected) in mt_touch_report()
1211 mt_sync_frame(td, app, input); in mt_touch_report()
1231 if (app->quirks & MT_QUIRK_STICKY_FINGERS) { in mt_touch_report()
1244 struct mt_application *app) in mt_touch_input_configured() argument
1254 mt_post_parse(td, app); in mt_touch_input_configured()
1256 mt_post_parse_default_settings(td, app); in mt_touch_input_configured()
1259 app->mt_flags |= INPUT_MT_POINTER; in mt_touch_input_configured()
1261 if (app->quirks & MT_QUIRK_NOT_SEEN_MEANS_UP) in mt_touch_input_configured()
1262 app->mt_flags |= INPUT_MT_DROP_UNUSED; in mt_touch_input_configured()
1265 if ((app->mt_flags & INPUT_MT_POINTER) && in mt_touch_input_configured()
1266 (app->buttons_count == 1)) in mt_touch_input_configured()
1272 app->pending_palm_slots = devm_kcalloc(&hi->input->dev, in mt_touch_input_configured()
1276 if (!app->pending_palm_slots) in mt_touch_input_configured()
1279 ret = input_mt_init_slots(input, td->maxcontacts, app->mt_flags); in mt_touch_input_configured()
1283 app->mt_flags = 0; in mt_touch_input_configured()
1519 struct mt_application *app) in mt_post_parse_default_settings() argument
1521 __s32 quirks = app->quirks; in mt_post_parse_default_settings()
1524 if (list_is_singular(&app->mt_usages)) { in mt_post_parse_default_settings()
1532 app->quirks = quirks; in mt_post_parse_default_settings()
1535 static void mt_post_parse(struct mt_device *td, struct mt_application *app) in mt_post_parse() argument
1537 if (!app->have_contact_count) in mt_post_parse()
1538 app->quirks &= ~MT_QUIRK_CONTACT_CNT_ACCURATE; in mt_post_parse()