Lines Matching refs:usage

110 	field->usage = (struct hid_usage *)(field + 1);
111 field->value = (s32 *)(field->usage + usages);
118 * Open a collection. The type/usage is pushed on the stack.
124 unsigned usage;
127 usage = parser->local.usage[0];
171 collection->usage = usage;
198 * and return the usage.
209 return collection[index].usage;
211 return 0; /* we know nothing about this usage type */
215 * Concatenate usage which defines 16 bits or less with the
216 * currently defined usage page to form a 32 bit usage
221 parser->local.usage[index] &= 0xFFFF;
222 parser->local.usage[index] |=
227 * Add a usage to the temporary parser table.
230 static int hid_add_usage(struct hid_parser *parser, unsigned usage, u8 size)
233 hid_err(parser->device, "usage index exceeded\n");
236 parser->local.usage[parser->local.usage_index] = usage;
239 * If Usage item only includes usage id, concatenate it with
240 * currently defined usage page
317 /* Duplicate the last usage we parsed if we have excess values */
320 field->usage[i].hid = parser->local.usage[j];
321 field->usage[i].collection_index =
323 field->usage[i].usage_index = i;
324 field->usage[i].resolution_multiplier = 1;
491 * as global to all usage sets (branch 0).
513 dbg_hid("alternative usage ignored\n");
522 dbg_hid("alternative usage ignored\n");
532 dbg_hid("alternative usage ignored\n");
544 "ignoring exceeding usage max\n");
549 "no more usage index available\n");
573 * usage value."
588 * Concatenate usage page again only if last declared Usage Page
596 current_page = parser->local.usage[i] >> 16;
654 * Free a report and all registered fields. The field->usage and
788 static void hid_scan_input_usage(struct hid_parser *parser, u32 usage)
792 if (usage == HID_DG_CONTACTID)
796 static void hid_scan_feature_usage(struct hid_parser *parser, u32 usage)
798 if (usage == 0xff0000c5 && parser->global.report_count == 256 &&
802 if (usage == 0xff0000c6 && parser->global.report_count == 1 &&
823 if (parser->local.usage[i] == HID_GD_POINTER)
831 if (parser->local.usage[i] ==
857 hid_scan_input_usage(parser, parser->local.usage[i]);
863 hid_scan_feature_usage(parser, parser->local.usage[i]);
1071 struct hid_usage *usage;
1081 usage = &field->usage[i];
1083 collection = &hid->collection[usage->collection_index];
1090 usage->resolution_multiplier = effective_multiplier;
1123 multiplier_collection = &hid->collection[multiplier->usage->collection_index];
1168 struct hid_usage *usage;
1179 usage = &rep->field[i]->usage[j];
1180 if (usage->hid == HID_GD_RESOLUTION_MULTIPLIER)
1495 * @usage: usage to match against
1498 * usage->usage_{type,code}
1500 static int hid_match_usage(struct hid_device *hid, struct hid_usage *usage)
1509 id->usage_hid == usage->hid) &&
1511 id->usage_type == usage->type) &&
1513 id->usage_code == usage->code))
1519 struct hid_usage *usage, __s32 value, int interrupt)
1525 hid_dump_input(hid, usage, value);
1527 if (hdrv && hdrv->event && hid_match_usage(hid, usage)) {
1528 ret = hdrv->event(hid, field, usage, value);
1538 hidinput_hid_event(hid, field, usage, value);
1540 hid->hiddev_hid_event(hid, field, usage, value);
1575 field->usage[value[n] - min].hid == HID_UP_KEYBOARD + 1)
1582 hid_process_event(hid, field, &field->usage[n], value[n], interrupt);
1588 && field->usage[field->value[n] - min].hid
1590 hid_process_event(hid, field, &field->usage[field->value[n] - min], 0, interrupt);
1594 && field->usage[value[n] - min].hid
1596 hid_process_event(hid, field, &field->usage[value[n] - min], 1, interrupt);
1686 hid_dump_input(field->report->device, field->usage + offset, value);
2011 (col->usage & HID_USAGE_PAGE) == HID_UP_GENDESK &&
2012 (col->usage & 0xffff) < ARRAY_SIZE(types)) {
2013 type = types[col->usage & 0xffff];