Lines Matching full:collection

121  * Open a collection. The type/usage is pushed on the stack.
126 struct hid_collection *collection; in open_collection() local
148 collection = kmalloc( in open_collection()
153 if (collection == NULL) { in open_collection()
154 hid_err(parser->device, "failed to reallocate collection array\n"); in open_collection()
157 memcpy(collection, parser->device->collection, in open_collection()
160 memset(collection + parser->device->collection_size, 0, in open_collection()
163 kfree(parser->device->collection); in open_collection()
164 parser->device->collection = collection; in open_collection()
172 collection = parser->device->collection + collection_index; in open_collection()
173 collection->type = type; in open_collection()
174 collection->usage = usage; in open_collection()
175 collection->level = parser->collection_stack_ptr - 1; in open_collection()
176 collection->parent_idx = (collection->level == 0) ? -1 : in open_collection()
177 parser->collection_stack[collection->level - 1]; in open_collection()
186 * Close a collection.
192 hid_err(parser->device, "collection stack underflow\n"); in close_collection()
200 * Climb up the stack, search for the specified collection type
206 struct hid_collection *collection = parser->device->collection; in hid_lookup_collection() local
211 if (collection[index].type == type) in hid_lookup_collection()
212 return collection[index].usage; in hid_lookup_collection()
693 kfree(device->collection); in hid_close_report()
694 device->collection = NULL; in hid_close_report()
1064 struct hid_collection *collection; in hid_apply_multiplier_to_field() local
1071 * Otherwise, it is the Logical Collection the multiplier applies to in hid_apply_multiplier_to_field()
1072 * but our field may be in a subcollection of that collection. in hid_apply_multiplier_to_field()
1077 collection = &hid->collection[usage->collection_index]; in hid_apply_multiplier_to_field()
1078 while (collection->parent_idx != -1 && in hid_apply_multiplier_to_field()
1079 collection != multiplier_collection) in hid_apply_multiplier_to_field()
1080 collection = &hid->collection[collection->parent_idx]; in hid_apply_multiplier_to_field()
1082 if (collection->parent_idx != -1 || in hid_apply_multiplier_to_field()
1101 * Logical Collection as the control(s) to which it is to be applied. in hid_apply_multiplier()
1104 * Logical Collection, the Resolution Multiplier is associated with in hid_apply_multiplier()
1105 * all controls in the collection. If no Logical Collection is in hid_apply_multiplier()
1110 * Thus, search from the current collection upwards until we find a in hid_apply_multiplier()
1111 * logical collection. Then search all fields for that same parent in hid_apply_multiplier()
1112 * collection. Those are the fields the multiplier applies to. in hid_apply_multiplier()
1117 multiplier_collection = &hid->collection[multiplier->usage->collection_index]; in hid_apply_multiplier()
1120 multiplier_collection = &hid->collection[multiplier_collection->parent_idx]; in hid_apply_multiplier()
1248 device->collection = kcalloc(HID_DEFAULT_NUM_COLLECTIONS, in hid_open_report()
1250 if (!device->collection) { in hid_open_report()
1274 hid_err(device, "unbalanced collection at end of report description\n"); in hid_open_report()
2208 struct hid_collection *col = &hdev->collection[i]; in hid_connect()