Lines Matching refs:bundle

23 		return "bundle";
71 if (desc_cport->bundle == bundle_id)
224 * bundle, and set up data structures for the functions that use
225 * them. Returns the number of cports set up for the bundle, or 0
228 static u32 gb_manifest_parse_cports(struct gb_bundle *bundle)
230 struct gb_interface *intf = bundle->intf;
234 u8 bundle_id = bundle->id;
239 /* Set up all cport descriptors associated with this bundle */
245 if (desc_cport->bundle != bundle_id)
254 dev_err(&bundle->dev, "invalid cport id found (%02u)\n",
266 dev_err(&bundle->dev,
278 bundle->cport_desc = kcalloc(count, sizeof(*bundle->cport_desc),
280 if (!bundle->cport_desc)
283 bundle->num_cports = count;
288 memcpy(&bundle->cport_desc[i++], desc_cport,
299 * Free all cports for this bundle to avoid 'excess descriptors'
308 * Find bundle descriptors in the manifest and set up their data
315 struct gb_bundle *bundle;
324 /* Found one. Set up its bundle structure*/
329 /* Done with this bundle descriptor */
334 dev_dbg(&intf->dev, "%s - ignoring control bundle\n",
344 "bundle %u cannot use control class\n",
349 bundle = gb_bundle_create(intf, bundle_id, class);
350 if (!bundle)
354 * Now go set up this bundle's functions and cports.
356 * A 'bundle' represents a device in greybus. It may require
358 * cport of a bundle, we better reject the complete bundle as
361 * But, failing to setup a cport of bundle X doesn't mean that
362 * the device corresponding to bundle Y will not work properly.
368 * bundle which needs the cport, gets destroyed properly.
370 if (!gb_manifest_parse_cports(bundle)) {
371 gb_bundle_destroy(bundle);
381 list_for_each_entry_safe(bundle, bundle_next, &intf->bundles, links) {
382 gb_bundle_destroy(bundle);
412 /* An interface must have at least one bundle descriptor */
414 dev_err(&intf->dev, "manifest bundle descriptors not valid\n");