Lines Matching refs:usage

106 	field->usage = (struct hid_usage *)(field + 1);
107 field->value = (s32 *)(field->usage + usages);
116 * Open a collection. The type/usage is pushed on the stack.
122 unsigned usage;
125 usage = parser->local.usage[0];
169 collection->usage = usage;
196 * and return the usage.
207 return collection[index].usage;
209 return 0; /* we know nothing about this usage type */
213 * Concatenate usage which defines 16 bits or less with the
214 * currently defined usage page to form a 32 bit usage
219 parser->local.usage[index] &= 0xFFFF;
220 parser->local.usage[index] |=
225 * Add a usage to the temporary parser table.
228 static int hid_add_usage(struct hid_parser *parser, unsigned usage, u8 size)
231 hid_err(parser->device, "usage index exceeded\n");
234 parser->local.usage[parser->local.usage_index] = usage;
237 * If Usage item only includes usage id, concatenate it with
238 * currently defined usage page
315 /* Duplicate the last usage we parsed if we have excess values */
318 field->usage[i].hid = parser->local.usage[j];
319 field->usage[i].collection_index =
321 field->usage[i].usage_index = i;
322 field->usage[i].resolution_multiplier = 1;
489 * as global to all usage sets (branch 0).
511 dbg_hid("alternative usage ignored\n");
520 dbg_hid("alternative usage ignored\n");
530 dbg_hid("alternative usage ignored\n");
542 "ignoring exceeding usage max\n");
547 "no more usage index available\n");
571 * usage value."
586 * Concatenate usage page again only if last declared Usage Page
594 current_page = parser->local.usage[i] >> 16;
652 * 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 &&
824 if (parser->local.usage[i] == HID_GD_POINTER)
832 if (parser->local.usage[i] ==
858 hid_scan_input_usage(parser, parser->local.usage[i]);
864 hid_scan_feature_usage(parser, parser->local.usage[i]);
1072 struct hid_usage *usage;
1082 usage = &field->usage[i];
1084 collection = &hid->collection[usage->collection_index];
1091 usage->resolution_multiplier = effective_multiplier;
1124 multiplier_collection = &hid->collection[multiplier->usage->collection_index];
1169 struct hid_usage *usage;
1180 usage = &rep->field[i]->usage[j];
1181 if (usage->hid == HID_GD_RESOLUTION_MULTIPLIER)
1498 * @usage: usage to match against
1501 * usage->usage_{type,code}
1503 static int hid_match_usage(struct hid_device *hid, struct hid_usage *usage)
1512 id->usage_hid == usage->hid) &&
1514 id->usage_type == usage->type) &&
1516 id->usage_code == usage->code))
1522 struct hid_usage *usage, __s32 value, int interrupt)
1528 hid_dump_input(hid, usage, value);
1530 if (hdrv && hdrv->event && hid_match_usage(hid, usage)) {
1531 ret = hdrv->event(hid, field, usage, value);
1541 hidinput_hid_event(hid, field, usage, value);
1543 hid->hiddev_hid_event(hid, field, usage, value);
1556 * (value - min) is used as an index in the usage array.
1593 field->usage[value[n] - min].hid == HID_UP_KEYBOARD + 1) {
1615 &field->usage[n],
1647 &field->usage[field->value[n] - min],
1655 &field->usage[value[n] - min],
1691 &field->usage[entry->index],
1898 hid_dump_input(field->report->device, field->usage + offset, value);
2235 (col->usage & HID_USAGE_PAGE) == HID_UP_GENDESK &&
2236 (col->usage & 0xffff) < ARRAY_SIZE(types)) {
2237 type = types[col->usage & 0xffff];