Lines Matching refs:report

64 	struct hid_report *report;  in hid_register_report()  local
71 report = kzalloc(sizeof(struct hid_report), GFP_KERNEL); in hid_register_report()
72 if (!report) in hid_register_report()
78 report->id = id; in hid_register_report()
79 report->type = type; in hid_register_report()
80 report->size = 0; in hid_register_report()
81 report->device = device; in hid_register_report()
82 report_enum->report_id_hash[id] = report; in hid_register_report()
84 list_add_tail(&report->list, &report_enum->report_list); in hid_register_report()
86 return report; in hid_register_report()
94 static struct hid_field *hid_register_field(struct hid_report *report, unsigned usages, unsigned va… in hid_register_field() argument
98 if (report->maxfield == HID_MAX_FIELDS) { in hid_register_field()
99 hid_err(report->device, "too many fields in report\n"); in hid_register_field()
109 field->index = report->maxfield++; in hid_register_field()
110 report->field[field->index] = field; in hid_register_field()
113 field->report = report; in hid_register_field()
223 struct hid_report *report; in hid_add_field() local
229 report = hid_register_report(parser->device, report_type, parser->global.report_id); in hid_add_field()
230 if (!report) { in hid_add_field()
248 offset = report->size; in hid_add_field()
249 report->size += parser->global.report_size * parser->global.report_count; in hid_add_field()
257 field = hid_register_field(report, usages, parser->global.report_count); in hid_add_field()
580 static void hid_free_report(struct hid_report *report) in hid_free_report() argument
584 for (n = 0; n < report->maxfield; n++) in hid_free_report()
585 kfree(report->field[n]); in hid_free_report()
586 kfree(report); in hid_free_report()
601 struct hid_report *report = report_enum->report_id_hash[j]; in hid_close_report() local
602 if (report) in hid_close_report()
603 hid_free_report(report); in hid_close_report()
884 struct hid_report *report; in hid_validate_values() local
906 report = list_entry( in hid_validate_values()
910 report = hid->report_enum[type].report_id_hash[id]; in hid_validate_values()
912 if (!report) { in hid_validate_values()
916 if (report->maxfield <= field_index) { in hid_validate_values()
921 if (report->field[field_index]->report_count < report_counts) { in hid_validate_values()
926 return report; in hid_validate_values()
1086 __u32 hid_field_extract(const struct hid_device *hid, __u8 *report, in hid_field_extract() argument
1095 report += offset >> 3; /* adjust byte index */ in hid_field_extract()
1097 x = get_unaligned_le64(report); in hid_field_extract()
1111 static void implement(const struct hid_device *hid, __u8 *report, in implement() argument
1127 report += offset >> 3; in implement()
1130 x = get_unaligned_le64(report); in implement()
1133 put_unaligned_le64(x, report); in implement()
1157 static int hid_match_report(struct hid_device *hid, struct hid_report *report) in hid_match_report() argument
1166 id->report_type == report->type) in hid_match_report()
1308 void hid_output_report(struct hid_report *report, __u8 *data) in hid_output_report() argument
1312 if (report->id > 0) in hid_output_report()
1313 *data++ = report->id; in hid_output_report()
1315 memset(data, 0, ((report->size - 1) >> 3) + 1); in hid_output_report()
1316 for (n = 0; n < report->maxfield; n++) in hid_output_report()
1317 hid_output_field(report->device, report->field[n], data); in hid_output_report()
1324 u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags) in hid_alloc_report_buf() argument
1331 int len = hid_report_len(report) + 7; in hid_alloc_report_buf()
1352 hid_dump_input(field->report->device, field->usage + offset, value); in hid_set_field()
1355 hid_err(field->report->device, "offset (%d) exceeds report_count (%d)\n", in hid_set_field()
1361 hid_err(field->report->device, "value %d is out of range\n", value); in hid_set_field()
1373 struct hid_report *report; in hid_get_report() local
1380 report = report_enum->report_id_hash[n]; in hid_get_report()
1381 if (report == NULL) in hid_get_report()
1384 return report; in hid_get_report()
1391 void __hid_request(struct hid_device *hid, struct hid_report *report, in __hid_request() argument
1398 buf = hid_alloc_report_buf(report, GFP_KERNEL); in __hid_request()
1402 len = hid_report_len(report); in __hid_request()
1405 hid_output_report(report, buf); in __hid_request()
1407 ret = hid->ll_driver->raw_request(hid, report->id, buf, len, in __hid_request()
1408 report->type, reqtype); in __hid_request()
1415 hid_input_report(hid, report->type, buf, ret, 0); in __hid_request()
1426 struct hid_report *report; in hid_report_raw_event() local
1433 report = hid_get_report(report_enum, data); in hid_report_raw_event()
1434 if (!report) in hid_report_raw_event()
1442 rsize = ((report->size - 1) >> 3) + 1; in hid_report_raw_event()
1448 dbg_hid("report %d is too short, (%d < %d)\n", report->id, in hid_report_raw_event()
1454 hid->hiddev_report_event(hid, report); in hid_report_raw_event()
1461 if (hid->claimed != HID_CLAIMED_HIDRAW && report->maxfield) { in hid_report_raw_event()
1462 for (a = 0; a < report->maxfield; a++) in hid_report_raw_event()
1463 hid_input_field(hid, report->field[a], cdata, interrupt); in hid_report_raw_event()
1465 if (hdrv && hdrv->report) in hid_report_raw_event()
1466 hdrv->report(hid, report); in hid_report_raw_event()
1470 hidinput_report_event(hid, report); in hid_report_raw_event()
1491 struct hid_report *report; in hid_input_report() local
1517 report = hid_get_report(report_enum, data); in hid_input_report()
1519 if (!report) { in hid_input_report()
1524 if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) { in hid_input_report()
1525 ret = hdrv->raw_event(hid, report, data, size); in hid_input_report()