Lines Matching refs:usage

348 		struct hid_field *field, struct hid_usage *usage)  in mt_feature_mapping()  argument
352 switch (usage->hid) { in mt_feature_mapping()
355 if (usage->usage_index >= field->report_count) { in mt_feature_mapping()
362 td->inputmode_index = usage->usage_index; in mt_feature_mapping()
389 if (usage->usage_index >= field->report_count) { in mt_feature_mapping()
395 if (field->value[usage->usage_index] == MT_BUTTONTYPE_CLICKPAD) in mt_feature_mapping()
401 if (usage->usage_index == 0) in mt_feature_mapping()
417 static void mt_store_field(struct hid_usage *usage, struct mt_device *td, in mt_store_field() argument
425 f->usages[f->length++] = usage->hid; in mt_store_field()
429 struct hid_field *field, struct hid_usage *usage, in mt_touch_input_mapping() argument
444 (usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) { in mt_touch_input_mapping()
450 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) in mt_touch_input_mapping()
453 if (usage->usage_index) in mt_touch_input_mapping()
454 prev_usage = &field->usage[usage->usage_index - 1]; in mt_touch_input_mapping()
456 switch (usage->hid & HID_USAGE_PAGE) { in mt_touch_input_mapping()
459 switch (usage->hid) { in mt_touch_input_mapping()
461 if (prev_usage && (prev_usage->hid == usage->hid)) { in mt_touch_input_mapping()
462 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
467 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
473 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
476 if (prev_usage && (prev_usage->hid == usage->hid)) { in mt_touch_input_mapping()
477 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
482 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
488 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
494 switch (usage->hid) { in mt_touch_input_mapping()
497 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
502 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
505 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
508 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH); in mt_touch_input_mapping()
510 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
513 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
518 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
523 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
526 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
534 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
537 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
541 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
546 usage->usage_index >= field->report_count) in mt_touch_input_mapping()
549 td->cc_value_index = usage->usage_index; in mt_touch_input_mapping()
564 code = BTN_MOUSE + ((usage->hid - 1) & HID_USAGE); in mt_touch_input_mapping()
565 hid_map_usage(hi, usage, bit, max, EV_KEY, code); in mt_touch_input_mapping()
578 struct hid_field *field, struct hid_usage *usage, in mt_touch_input_mapped() argument
581 if (usage->type == EV_KEY || usage->type == EV_ABS) in mt_touch_input_mapped()
582 set_bit(usage->type, hi->input->evbit); in mt_touch_input_mapped()
669 struct hid_usage *usage, __s32 value) in mt_touch_event() argument
673 hid->hiddev_hid_event(hid, field, usage, value); in mt_touch_event()
679 struct hid_usage *usage, __s32 value) in mt_process_mt_event() argument
686 switch (usage->hid) { in mt_process_mt_event()
709 if (usage->code == ABS_MT_TOOL_X) in mt_process_mt_event()
715 if (usage->code == ABS_MT_TOOL_Y) in mt_process_mt_event()
733 if (usage->type) in mt_process_mt_event()
734 input_event(input, usage->type, usage->code, in mt_process_mt_event()
739 if (usage->usage_index + 1 == field->report_count) { in mt_process_mt_event()
741 if (usage->hid == td->last_slot_field) in mt_process_mt_event()
774 mt_process_mt_event(hid, field, &field->usage[n], in mt_touch_report()
819 struct hid_field *field, struct hid_usage *usage, in mt_input_mapping() argument
852 return mt_touch_input_mapping(hdev, hi, field, usage, bit, max); in mt_input_mapping()
859 struct hid_field *field, struct hid_usage *usage, in mt_input_mapped() argument
871 return mt_touch_input_mapped(hdev, hi, field, usage, bit, max); in mt_input_mapped()
878 struct hid_usage *usage, __s32 value) in mt_event() argument
883 return mt_touch_event(hid, field, usage, value); in mt_event()