Lines Matching refs:field
447 struct hid_field *field, struct hid_usage *usage) in mt_feature_mapping() argument
453 mt_get_feature(hdev, field->report); in mt_feature_mapping()
455 td->maxcontacts = field->value[0]; in mt_feature_mapping()
457 field->logical_maximum <= MT_MAX_MAXCONTACT) in mt_feature_mapping()
458 td->maxcontacts = field->logical_maximum; in mt_feature_mapping()
465 if (usage->usage_index >= field->report_count) { in mt_feature_mapping()
470 mt_get_feature(hdev, field->report); in mt_feature_mapping()
471 if (field->value[usage->usage_index] == MT_BUTTONTYPE_CLICKPAD) in mt_feature_mapping()
478 mt_get_feature(hdev, field->report); in mt_feature_mapping()
484 struct hid_field *field, int snratio) in set_abs() argument
486 int fmin = field->logical_minimum; in set_abs()
487 int fmax = field->logical_maximum; in set_abs()
490 input_abs_set_res(input, code, hidinput_calc_abs_res(field, code)); in set_abs()
582 struct hid_field *field; in mt_allocate_report_data() local
598 field = report->field[r]; in mt_allocate_report_data()
600 if (!(HID_MAIN_ITEM_VARIABLE & field->flags)) in mt_allocate_report_data()
603 for (n = 0; n < field->report_count; n++) { in mt_allocate_report_data()
604 if (field->usage[n].hid == HID_DG_CONTACTID) in mt_allocate_report_data()
675 &field->value[usage->usage_index], \
679 struct hid_field *field, struct hid_usage *usage, in mt_touch_input_mapping() argument
690 if (field->application == HID_DG_TOUCHSCREEN && in mt_touch_input_mapping()
701 prev_usage = &field->usage[usage->usage_index - 1]; in mt_touch_input_mapping()
716 set_abs(hi->input, code, field, cls->sn_move); in mt_touch_input_mapping()
722 if (field->application == HID_GD_SYSTEM_MULTIAXIS) { in mt_touch_input_mapping()
741 set_abs(hi->input, code, field, cls->sn_move); in mt_touch_input_mapping()
759 (field->application == HID_DG_TOUCHPAD || in mt_touch_input_mapping()
760 field->application == HID_DG_TOUCHSCREEN)) in mt_touch_input_mapping()
772 if (field->application != HID_GD_SYSTEM_MULTIAXIS) in mt_touch_input_mapping()
783 set_abs(hi->input, ABS_MT_TOUCH_MAJOR, field, in mt_touch_input_mapping()
789 set_abs(hi->input, ABS_MT_TOUCH_MINOR, field, in mt_touch_input_mapping()
804 set_abs(hi->input, ABS_MT_PRESSURE, field, in mt_touch_input_mapping()
810 app->scantime = &field->value[usage->usage_index]; in mt_touch_input_mapping()
811 app->scantime_logical_max = field->logical_maximum; in mt_touch_input_mapping()
815 app->raw_cc = &field->value[usage->usage_index]; in mt_touch_input_mapping()
824 -field->logical_maximum / 4, in mt_touch_input_mapping()
825 field->logical_maximum / 4, in mt_touch_input_mapping()
827 field->logical_maximum / cls->sn_move : 0, 0); in mt_touch_input_mapping()
848 field->application == HID_DG_TOUCHPAD && in mt_touch_input_mapping()
852 if (field->application == HID_GD_SYSTEM_MULTIAXIS) in mt_touch_input_mapping()
956 static int mt_touch_event(struct hid_device *hid, struct hid_field *field, in mt_touch_event() argument
961 hid->hiddev_hid_event(hid, field, usage, value); in mt_touch_event()
1095 struct hid_field *field, in mt_process_mt_event() argument
1101 struct input_dev *input = field->hidinput->input; in mt_process_mt_event()
1138 struct hid_field *field; in mt_touch_report() local
1180 input = report->field[0]->hidinput->input; in mt_touch_report()
1188 field = report->field[r]; in mt_touch_report()
1189 count = field->report_count; in mt_touch_report()
1191 if (!(HID_MAIN_ITEM_VARIABLE & field->flags)) in mt_touch_report()
1195 mt_process_mt_event(hid, app, field, in mt_touch_report()
1196 &field->usage[n], field->value[n], in mt_touch_report()
1280 struct hid_field *field, struct hid_usage *usage, in mt_input_mapping() argument
1287 rdata = mt_find_report_data(td, field->report); in mt_input_mapping()
1302 field->application != HID_DG_TOUCHSCREEN && in mt_input_mapping()
1303 field->application != HID_DG_PEN && in mt_input_mapping()
1304 field->application != HID_DG_TOUCHPAD && in mt_input_mapping()
1305 field->application != HID_GD_KEYBOARD && in mt_input_mapping()
1306 field->application != HID_GD_SYSTEM_CONTROL && in mt_input_mapping()
1307 field->application != HID_CP_CONSUMER_CONTROL && in mt_input_mapping()
1308 field->application != HID_GD_WIRELESS_RADIO_CTLS && in mt_input_mapping()
1309 field->application != HID_GD_SYSTEM_MULTIAXIS && in mt_input_mapping()
1310 !(field->application == HID_VD_ASUS_CUSTOM_MEDIA_KEYS && in mt_input_mapping()
1319 if (field->application == HID_VD_ASUS_CUSTOM_MEDIA_KEYS && in mt_input_mapping()
1323 if (field->flags & HID_MAIN_ITEM_VARIABLE) in mt_input_mapping()
1324 field->flags &= ~HID_MAIN_ITEM_VARIABLE; in mt_input_mapping()
1338 return mt_touch_input_mapping(hdev, hi, field, usage, bit, max, in mt_input_mapping()
1345 if (field->physical == HID_DG_STYLUS) in mt_input_mapping()
1353 struct hid_field *field, struct hid_usage *usage, in mt_input_mapped() argument
1359 rdata = mt_find_report_data(td, field->report); in mt_input_mapped()
1369 static int mt_event(struct hid_device *hid, struct hid_field *field, in mt_event() argument
1375 rdata = mt_find_report_data(td, field->report); in mt_event()
1377 return mt_touch_event(hid, field, usage, value); in mt_event()
1385 struct hid_field *field = report->field[0]; in mt_report() local
1395 if (field && field->hidinput && field->hidinput->input) in mt_report()
1396 input_sync(field->hidinput->input); in mt_report()
1400 struct hid_field *field, in mt_need_to_apply_feature() argument
1409 struct hid_report *report = field->report; in mt_need_to_apply_feature()
1439 field->value[index] = td->inputmode_value; in mt_need_to_apply_feature()
1445 max = min_t(int, field->logical_maximum, in mt_need_to_apply_feature()
1447 if (field->value[index] != max) { in mt_need_to_apply_feature()
1448 field->value[index] = max; in mt_need_to_apply_feature()
1455 field->value[index] = latency; in mt_need_to_apply_feature()
1459 field->value[index] = surface_switch; in mt_need_to_apply_feature()
1463 field->value[index] = button_switch; in mt_need_to_apply_feature()
1486 if (rep->field[i]->report_count < 1) in mt_set_modes()
1489 for (j = 0; j < rep->field[i]->maxusage; j++) { in mt_set_modes()
1490 usage = &rep->field[i]->usage[j]; in mt_set_modes()
1493 rep->field[i], in mt_set_modes()
1601 static void mt_fix_const_field(struct hid_field *field, unsigned int usage) in mt_fix_const_field() argument
1603 if (field->usage[0].hid != usage || in mt_fix_const_field()
1604 !(field->flags & HID_MAIN_ITEM_CONSTANT)) in mt_fix_const_field()
1607 field->flags &= ~HID_MAIN_ITEM_CONSTANT; in mt_fix_const_field()
1608 field->flags |= HID_MAIN_ITEM_VARIABLE; in mt_fix_const_field()
1624 if (report->field[i]->maxusage >= 1) in mt_fix_const_fields()
1625 mt_fix_const_field(report->field[i], usage); in mt_fix_const_fields()