• Home
  • Raw
  • Download

Lines Matching refs:usage

388 		struct hid_field *field, struct hid_usage *usage)  in mt_feature_mapping()  argument
392 switch (usage->hid) { in mt_feature_mapping()
395 if (usage->usage_index >= field->report_count) { in mt_feature_mapping()
402 td->inputmode_index = usage->usage_index; in mt_feature_mapping()
429 if (usage->usage_index >= field->report_count) { in mt_feature_mapping()
435 if (field->value[usage->usage_index] == MT_BUTTONTYPE_CLICKPAD) in mt_feature_mapping()
441 if (usage->usage_index == 0) in mt_feature_mapping()
457 static void mt_store_field(struct hid_usage *usage, struct mt_device *td, in mt_store_field() argument
465 f->usages[f->length++] = usage->hid; in mt_store_field()
469 struct hid_field *field, struct hid_usage *usage, in mt_touch_input_mapping() argument
484 (usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) { in mt_touch_input_mapping()
490 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON) in mt_touch_input_mapping()
493 if (usage->usage_index) in mt_touch_input_mapping()
494 prev_usage = &field->usage[usage->usage_index - 1]; in mt_touch_input_mapping()
496 switch (usage->hid & HID_USAGE_PAGE) { in mt_touch_input_mapping()
499 switch (usage->hid) { in mt_touch_input_mapping()
501 if (prev_usage && (prev_usage->hid == usage->hid)) { in mt_touch_input_mapping()
502 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
507 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
513 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
516 if (prev_usage && (prev_usage->hid == usage->hid)) { in mt_touch_input_mapping()
517 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
522 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
528 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
534 switch (usage->hid) { in mt_touch_input_mapping()
537 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
542 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
549 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
552 hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_TOUCH); in mt_touch_input_mapping()
554 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
557 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
562 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
567 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
570 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
578 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
581 hid_map_usage(hi, usage, bit, max, in mt_touch_input_mapping()
585 mt_store_field(usage, td, hi); in mt_touch_input_mapping()
590 usage->usage_index >= field->report_count) in mt_touch_input_mapping()
593 td->cc_value_index = usage->usage_index; in mt_touch_input_mapping()
608 code = BTN_MOUSE + ((usage->hid - 1) & HID_USAGE); in mt_touch_input_mapping()
616 (usage->hid & HID_USAGE) > 1) in mt_touch_input_mapping()
618 hid_map_usage(hi, usage, bit, max, EV_KEY, code); in mt_touch_input_mapping()
732 struct hid_usage *usage, __s32 value) in mt_touch_event() argument
736 hid->hiddev_hid_event(hid, field, usage, value); in mt_touch_event()
742 struct hid_usage *usage, __s32 value, in mt_process_mt_event() argument
751 switch (usage->hid) { in mt_process_mt_event()
776 if (usage->code == ABS_MT_TOOL_X) in mt_process_mt_event()
782 if (usage->code == ABS_MT_TOOL_Y) in mt_process_mt_event()
809 if (usage->type) in mt_process_mt_event()
810 input_event(input, usage->type, usage->code, in mt_process_mt_event()
815 if (usage->usage_index + 1 == field->report_count) { in mt_process_mt_event()
817 if (usage->hid == td->last_slot_field) in mt_process_mt_event()
856 mt_process_mt_event(hid, field, &field->usage[n], in mt_touch_report()
928 #define mt_map_key_clear(c) hid_map_usage_clear(hi, usage, bit, \
931 struct hid_field *field, struct hid_usage *usage, in mt_input_mapping() argument
961 (usage->hid & HID_USAGE_PAGE) == HID_UP_CUSTOM) { in mt_input_mapping()
965 switch (usage->hid & HID_USAGE) { in mt_input_mapping()
993 return mt_touch_input_mapping(hdev, hi, field, usage, bit, max); in mt_input_mapping()
1000 struct hid_field *field, struct hid_usage *usage, in mt_input_mapped() argument
1021 struct hid_usage *usage, __s32 value) in mt_event() argument
1026 return mt_touch_event(hid, field, usage, value); in mt_event()
1210 static void mt_fix_const_field(struct hid_field *field, unsigned int usage) in mt_fix_const_field() argument
1212 if (field->usage[0].hid != usage || in mt_fix_const_field()
1220 static void mt_fix_const_fields(struct hid_device *hdev, unsigned int usage) in mt_fix_const_fields() argument
1234 mt_fix_const_field(report->field[i], usage); in mt_fix_const_fields()