Lines Matching refs:usage

313 		struct hid_field *field, struct hid_usage *usage)  in mt_feature_mapping()  argument
317 switch (usage->hid) { in mt_feature_mapping()
320 if (usage->usage_index >= field->report_count) { in mt_feature_mapping()
327 td->inputmode_index = usage->usage_index; in mt_feature_mapping()
352 if (usage->usage_index >= field->report_count) { in mt_feature_mapping()
357 if (field->value[usage->usage_index] == MT_BUTTONTYPE_CLICKPAD) in mt_feature_mapping()
374 static void mt_store_field(struct hid_usage *usage, struct mt_device *td, in mt_store_field() argument
382 f->usages[f->length++] = usage->hid; in mt_store_field()
386 struct hid_field *field, struct hid_usage *usage, in mt_touch_input_mapping() argument
401 (usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) { in mt_touch_input_mapping()
407 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) in mt_touch_input_mapping()
410 if (usage->usage_index) in mt_touch_input_mapping()
411 prev_usage = &field->usage[usage->usage_index - 1]; in mt_touch_input_mapping()
413 switch (usage->hid & HID_USAGE_PAGE) { in mt_touch_input_mapping()
416 switch (usage->hid) { in mt_touch_input_mapping()
418 if (prev_usage && (prev_usage->hid == usage->hid)) { in mt_touch_input_mapping()
419 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
424 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
430 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
433 if (prev_usage && (prev_usage->hid == usage->hid)) { in mt_touch_input_mapping()
434 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
439 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
445 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
451 switch (usage->hid) { in mt_touch_input_mapping()
454 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
459 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
462 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
465 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH); in mt_touch_input_mapping()
467 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
470 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
475 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
480 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
483 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
491 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
494 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
498 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
503 usage->usage_index >= field->report_count) in mt_touch_input_mapping()
506 td->cc_value_index = usage->usage_index; in mt_touch_input_mapping()
521 code = BTN_MOUSE + ((usage->hid - 1) & HID_USAGE); in mt_touch_input_mapping()
522 hid_map_usage(hi, usage, bit, max, EV_KEY, code); in mt_touch_input_mapping()
535 struct hid_field *field, struct hid_usage *usage, in mt_touch_input_mapped() argument
538 if (usage->type == EV_KEY || usage->type == EV_ABS) in mt_touch_input_mapped()
539 set_bit(usage->type, hi->input->evbit); in mt_touch_input_mapped()
626 struct hid_usage *usage, __s32 value) in mt_touch_event() argument
630 hid->hiddev_hid_event(hid, field, usage, value); in mt_touch_event()
636 struct hid_usage *usage, __s32 value) in mt_process_mt_event() argument
643 switch (usage->hid) { in mt_process_mt_event()
666 if (usage->code == ABS_MT_TOOL_X) in mt_process_mt_event()
672 if (usage->code == ABS_MT_TOOL_Y) in mt_process_mt_event()
690 if (usage->type) in mt_process_mt_event()
691 input_event(input, usage->type, usage->code, in mt_process_mt_event()
696 if (usage->usage_index + 1 == field->report_count) { in mt_process_mt_event()
698 if (usage->hid == td->last_slot_field) in mt_process_mt_event()
731 mt_process_mt_event(hid, field, &field->usage[n], in mt_touch_report()
772 struct hid_field *field, struct hid_usage *usage, in mt_input_mapping() argument
798 return mt_touch_input_mapping(hdev, hi, field, usage, bit, max); in mt_input_mapping()
805 struct hid_field *field, struct hid_usage *usage, in mt_input_mapped() argument
817 return mt_touch_input_mapped(hdev, hi, field, usage, bit, max); in mt_input_mapped()
824 struct hid_usage *usage, __s32 value) in mt_event() argument
829 return mt_touch_event(hid, field, usage, value); in mt_event()