Lines Matching refs:bundle

60 static bool greybus_match_one_id(struct gb_bundle *bundle,
64 (id->vendor != bundle->intf->vendor_id))
68 (id->product != bundle->intf->product_id))
72 (id->class != bundle->class))
79 greybus_match_id(struct gb_bundle *bundle, const struct greybus_bundle_id *id)
86 if (greybus_match_one_id(bundle, id))
96 struct gb_bundle *bundle;
102 bundle = to_gb_bundle(dev);
104 id = greybus_match_id(bundle, driver->id_table);
117 const struct gb_bundle *bundle = NULL;
135 bundle = to_gb_bundle(dev);
136 intf = bundle->intf;
163 if (bundle) {
165 // add a uevent that can "load" a bundle type
169 if (add_uevent_var(env, "BUNDLE=%u", bundle->id))
171 if (add_uevent_var(env, "BUNDLE_CLASS=%02x", bundle->class))
198 struct gb_bundle *bundle = to_gb_bundle(dev);
203 id = greybus_match_id(bundle, driver->id_table);
207 retval = pm_runtime_get_sync(&bundle->intf->dev);
209 pm_runtime_put_noidle(&bundle->intf->dev);
213 retval = gb_control_bundle_activate(bundle->intf->control, bundle->id);
215 pm_runtime_put(&bundle->intf->dev);
220 * Unbound bundle devices are always deactivated. During probe, the
232 retval = driver->probe(bundle, id);
237 WARN_ON(!list_empty(&bundle->connections));
239 gb_control_bundle_deactivate(bundle->intf->control, bundle->id);
245 pm_runtime_put(&bundle->intf->dev);
250 pm_runtime_put(&bundle->intf->dev);
258 struct gb_bundle *bundle = to_gb_bundle(dev);
264 dev_err(dev, "failed to resume bundle: %d\n", retval);
271 list_for_each_entry(connection, &bundle->connections, bundle_links) {
275 if (bundle->intf->disconnected)
281 driver->disconnect(bundle);
284 WARN_ON(!list_empty(&bundle->connections));
286 if (!bundle->intf->disconnected)
287 gb_control_bundle_deactivate(bundle->intf->control, bundle->id);