Lines Matching refs:field
481 struct hid_field *field, struct hid_usage *usage) in mt_feature_mapping() argument
487 mt_get_feature(hdev, field->report); in mt_feature_mapping()
489 td->maxcontacts = field->value[0]; in mt_feature_mapping()
491 field->logical_maximum <= MT_MAX_MAXCONTACT) in mt_feature_mapping()
492 td->maxcontacts = field->logical_maximum; in mt_feature_mapping()
499 if (usage->usage_index >= field->report_count) { in mt_feature_mapping()
504 mt_get_feature(hdev, field->report); in mt_feature_mapping()
505 if (field->value[usage->usage_index] == MT_BUTTONTYPE_CLICKPAD) in mt_feature_mapping()
512 mt_get_feature(hdev, field->report); in mt_feature_mapping()
518 struct hid_field *field, int snratio) in set_abs() argument
520 int fmin = field->logical_minimum; in set_abs()
521 int fmax = field->logical_maximum; in set_abs()
524 input_abs_set_res(input, code, hidinput_calc_abs_res(field, code)); in set_abs()
616 struct hid_field *field; in mt_allocate_report_data() local
632 field = report->field[r]; in mt_allocate_report_data()
634 if (!(HID_MAIN_ITEM_VARIABLE & field->flags)) in mt_allocate_report_data()
637 if (field->logical == HID_DG_FINGER || td->hdev->group != HID_GROUP_MULTITOUCH_WIN_8) { in mt_allocate_report_data()
638 for (n = 0; n < field->report_count; n++) { in mt_allocate_report_data()
639 if (field->usage[n].hid == HID_DG_CONTACTID) { in mt_allocate_report_data()
713 &field->value[usage->usage_index], \
717 struct hid_field *field, struct hid_usage *usage, in mt_touch_input_mapping() argument
728 if (field->application == HID_DG_TOUCHSCREEN && in mt_touch_input_mapping()
739 prev_usage = &field->usage[usage->usage_index - 1]; in mt_touch_input_mapping()
754 set_abs(hi->input, code, field, cls->sn_move); in mt_touch_input_mapping()
760 if (field->application == HID_GD_SYSTEM_MULTIAXIS) { in mt_touch_input_mapping()
779 set_abs(hi->input, code, field, cls->sn_move); in mt_touch_input_mapping()
799 (field->application == HID_DG_TOUCHPAD || in mt_touch_input_mapping()
800 field->application == HID_DG_TOUCHSCREEN)) in mt_touch_input_mapping()
812 if (field->application != HID_GD_SYSTEM_MULTIAXIS) in mt_touch_input_mapping()
823 set_abs(hi->input, ABS_MT_TOUCH_MAJOR, field, in mt_touch_input_mapping()
829 set_abs(hi->input, ABS_MT_TOUCH_MINOR, field, in mt_touch_input_mapping()
844 set_abs(hi->input, ABS_MT_PRESSURE, field, in mt_touch_input_mapping()
850 app->scantime = &field->value[usage->usage_index]; in mt_touch_input_mapping()
851 app->scantime_logical_max = field->logical_maximum; in mt_touch_input_mapping()
855 app->raw_cc = &field->value[usage->usage_index]; in mt_touch_input_mapping()
864 -field->logical_maximum / 4, in mt_touch_input_mapping()
865 field->logical_maximum / 4, in mt_touch_input_mapping()
867 field->logical_maximum / cls->sn_move : 0, 0); in mt_touch_input_mapping()
888 field->application == HID_DG_TOUCHPAD && in mt_touch_input_mapping()
892 if (field->application == HID_GD_SYSTEM_MULTIAXIS) in mt_touch_input_mapping()
998 static int mt_touch_event(struct hid_device *hid, struct hid_field *field, in mt_touch_event() argument
1003 hid->hiddev_hid_event(hid, field, usage, value); in mt_touch_event()
1158 struct hid_field *field, in mt_process_mt_event() argument
1164 struct input_dev *input = field->hidinput->input; in mt_process_mt_event()
1201 struct hid_field *field; in mt_touch_report() local
1243 input = report->field[0]->hidinput->input; in mt_touch_report()
1251 field = report->field[r]; in mt_touch_report()
1252 count = field->report_count; in mt_touch_report()
1254 if (!(HID_MAIN_ITEM_VARIABLE & field->flags)) in mt_touch_report()
1258 mt_process_mt_event(hid, app, field, in mt_touch_report()
1259 &field->usage[n], field->value[n], in mt_touch_report()
1343 struct hid_field *field, struct hid_usage *usage, in mt_input_mapping() argument
1350 rdata = mt_find_report_data(td, field->report); in mt_input_mapping()
1365 field->application != HID_DG_TOUCHSCREEN && in mt_input_mapping()
1366 field->application != HID_DG_PEN && in mt_input_mapping()
1367 field->application != HID_DG_TOUCHPAD && in mt_input_mapping()
1368 field->application != HID_GD_KEYBOARD && in mt_input_mapping()
1369 field->application != HID_GD_SYSTEM_CONTROL && in mt_input_mapping()
1370 field->application != HID_CP_CONSUMER_CONTROL && in mt_input_mapping()
1371 field->application != HID_GD_WIRELESS_RADIO_CTLS && in mt_input_mapping()
1372 field->application != HID_GD_SYSTEM_MULTIAXIS && in mt_input_mapping()
1373 !(field->application == HID_VD_ASUS_CUSTOM_MEDIA_KEYS && in mt_input_mapping()
1382 if (field->application == HID_VD_ASUS_CUSTOM_MEDIA_KEYS && in mt_input_mapping()
1386 if (field->flags & HID_MAIN_ITEM_VARIABLE) in mt_input_mapping()
1387 field->flags &= ~HID_MAIN_ITEM_VARIABLE; in mt_input_mapping()
1401 return mt_touch_input_mapping(hdev, hi, field, usage, bit, max, in mt_input_mapping()
1408 if (field->physical == HID_DG_STYLUS) in mt_input_mapping()
1416 struct hid_field *field, struct hid_usage *usage, in mt_input_mapped() argument
1422 rdata = mt_find_report_data(td, field->report); in mt_input_mapped()
1432 static int mt_event(struct hid_device *hid, struct hid_field *field, in mt_event() argument
1438 rdata = mt_find_report_data(td, field->report); in mt_event()
1440 return mt_touch_event(hid, field, usage, value); in mt_event()
1448 struct hid_field *field = report->field[0]; in mt_report() local
1458 if (field && field->hidinput && field->hidinput->input) in mt_report()
1459 input_sync(field->hidinput->input); in mt_report()
1463 struct hid_field *field, in mt_need_to_apply_feature() argument
1472 struct hid_report *report = field->report; in mt_need_to_apply_feature()
1502 field->value[index] = td->inputmode_value; in mt_need_to_apply_feature()
1508 max = min_t(int, field->logical_maximum, in mt_need_to_apply_feature()
1510 if (field->value[index] != max) { in mt_need_to_apply_feature()
1511 field->value[index] = max; in mt_need_to_apply_feature()
1518 field->value[index] = latency; in mt_need_to_apply_feature()
1522 field->value[index] = surface_switch; in mt_need_to_apply_feature()
1526 field->value[index] = button_switch; in mt_need_to_apply_feature()
1549 if (rep->field[i]->report_count < 1) in mt_set_modes()
1552 for (j = 0; j < rep->field[i]->maxusage; j++) { in mt_set_modes()
1553 usage = &rep->field[i]->usage[j]; in mt_set_modes()
1556 rep->field[i], in mt_set_modes()
1654 static void mt_fix_const_field(struct hid_field *field, unsigned int usage) in mt_fix_const_field() argument
1656 if (field->usage[0].hid != usage || in mt_fix_const_field()
1657 !(field->flags & HID_MAIN_ITEM_CONSTANT)) in mt_fix_const_field()
1660 field->flags &= ~HID_MAIN_ITEM_CONSTANT; in mt_fix_const_field()
1661 field->flags |= HID_MAIN_ITEM_VARIABLE; in mt_fix_const_field()
1677 if (report->field[i]->maxusage >= 1) in mt_fix_const_fields()
1678 mt_fix_const_field(report->field[i], usage); in mt_fix_const_fields()