• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/hid/

Lines Matching defs:report

44  * Register a new report for a device.
50 struct hid_report *report;
55 if (!(report = kzalloc(sizeof(struct hid_report), GFP_KERNEL)))
61 report->id = id;
62 report->type = type;
63 report->size = 0;
64 report->device = device;
65 report_enum->report_id_hash[id] = report;
67 list_add_tail(&report->list, &report_enum->report_list);
69 return report;
73 * Register a new field for this report.
76 static struct hid_field *hid_register_field(struct hid_report *report, unsigned usages, unsigned values)
80 if (report->maxfield == HID_MAX_FIELDS) {
81 dbg("too many fields in report");
88 field->index = report->maxfield++;
89 report->field[field->index] = field;
92 field->report = report;
193 * Register a new field for this report.
198 struct hid_report *report;
204 if (!(report = hid_register_report(parser->device, report_type, parser->global.report_id))) {
214 offset = report->size;
215 report->size += parser->global.report_size * parser->global.report_count;
222 if ((field = hid_register_field(report, usages, parser->global.report_count)) == NULL)
510 * Free a report and all registered fields. The field->usage and
515 static void hid_free_report(struct hid_report *report)
519 for (n = 0; n < report->maxfield; n++)
520 kfree(report->field[n]);
521 kfree(report);
536 struct hid_report *report = report_enum->report_id_hash[j];
537 if (report)
538 hid_free_report(report);
549 * Fetch a report description item from the data stream. We support long
617 * Parse a report description into a hid_device structure. Reports are
686 dbg("unbalanced collection at end of report description");
692 dbg("unbalanced delimiter at end of report description");
738 * Extract/implement a data field from/to a little endian report (bit array).
743 * While the USB HID spec allows unlimited length bit fields in "report
745 * One model of UPS is claimed to report "LINEV" as a 32-bit field.
749 static __inline__ __u32 extract(__u8 *report, unsigned offset, unsigned n)
755 report += offset >> 3; /* adjust byte index */
757 x = le64_to_cpu(get_unaligned((__le64 *) report));
770 static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u32 value)
780 report += offset >> 3;
783 x = get_unaligned((__le64 *)report);
786 put_unaligned(x, (__le64 *) report);
813 * content is stored for next report processing (we do differential
835 if (!(field->flags & HID_MAIN_ITEM_VARIABLE) /* Ignore report if ErrorRollOver */
866 * Output the field into the report.
890 * Create a report.
893 void hid_output_report(struct hid_report *report, __u8 *data)
897 if (report->id > 0)
898 *data++ = report->id;
900 for (n = 0; n < report->maxfield; n++)
901 hid_output_field(report->field[n], data);
906 * Set a field value. The report this field belongs to has to be
936 struct hid_report *report;
943 dbg("empty report");
948 printk(KERN_DEBUG __FILE__ ": report (size %u) (%snumbered)\n", size, report_enum->numbered ? "" : "un");
951 n = 0; /* Normally report number is 0 */
952 if (report_enum->numbered) { /* Device uses numbered reports, data[0] is report number */
960 printk(KERN_DEBUG __FILE__ ": report %d (size %u) = ", n, size);
967 if (!(report = report_enum->report_id_hash[n])) {
972 rsize = ((report->size - 1) >> 3) + 1;
975 dbg("report %d is too short, (%d < %d)", report->id, size, rsize);
980 hid->hiddev_report_event(hid, report);
982 for (n = 0; n < report->maxfield; n++)
983 hid_input_field(hid, report->field[n], data, interrupt);
986 hidinput_report_event(hid, report);