Lines Matching refs:bundle

30 static bool greybus_match_one_id(struct gb_bundle *bundle,
34 (id->vendor != bundle->intf->vendor_id))
38 (id->product != bundle->intf->product_id))
42 (id->class != bundle->class))
49 greybus_match_id(struct gb_bundle *bundle, const struct greybus_bundle_id *id)
56 if (greybus_match_one_id(bundle, id))
66 struct gb_bundle *bundle;
72 bundle = to_gb_bundle(dev);
74 id = greybus_match_id(bundle, driver->id_table);
87 struct gb_bundle *bundle = NULL;
105 bundle = to_gb_bundle(dev);
106 intf = bundle->intf;
133 if (bundle) {
135 // add a uevent that can "load" a bundle type
139 if (add_uevent_var(env, "BUNDLE=%u", bundle->id))
141 if (add_uevent_var(env, "BUNDLE_CLASS=%02x", bundle->class))
168 struct gb_bundle *bundle = to_gb_bundle(dev);
173 id = greybus_match_id(bundle, driver->id_table);
177 retval = pm_runtime_get_sync(&bundle->intf->dev);
179 pm_runtime_put_noidle(&bundle->intf->dev);
183 retval = gb_control_bundle_activate(bundle->intf->control, bundle->id);
185 pm_runtime_put(&bundle->intf->dev);
190 * Unbound bundle devices are always deactivated. During probe, the
202 retval = driver->probe(bundle, id);
207 WARN_ON(!list_empty(&bundle->connections));
209 gb_control_bundle_deactivate(bundle->intf->control, bundle->id);
215 pm_runtime_put(&bundle->intf->dev);
220 pm_runtime_put(&bundle->intf->dev);
228 struct gb_bundle *bundle = to_gb_bundle(dev);
234 dev_err(dev, "failed to resume bundle: %d\n", retval);
241 list_for_each_entry(connection, &bundle->connections, bundle_links) {
245 if (bundle->intf->disconnected)
251 driver->disconnect(bundle);
254 WARN_ON(!list_empty(&bundle->connections));
256 if (!bundle->intf->disconnected)
257 gb_control_bundle_deactivate(bundle->intf->control, bundle->id);