device_unregister(&connection->dev);
}
- if (cport_id == GB_CONTROL_CPORT_ID)
+ static void gb_connection_disconnected(struct gb_connection *connection)
+ {
+ struct gb_control *control;
+ int cport_id = connection->intf_cport_id;
+ int ret;
+
+ /*
+ * Inform Interface about In-active CPorts. We don't need to do this
+ * operation for control cport.
+ */
++ if ((cport_id == GB_CONTROL_CPORT_ID) ||
++ (connection->hd_cport_id == GB_SVC_CPORT_ID))
+ return;
+
+ control = connection->bundle->intf->control;
+
+ ret = gb_control_disconnected_operation(control, cport_id);
+ if (ret)
+ dev_warn(&connection->dev,
+ "Failed to disconnect CPort-%d (%d)\n", cport_id, ret);
+ }
+
int gb_connection_init(struct gb_connection *connection)
{
int cport_id = connection->intf_cport_id;
struct gb_svc {
struct gb_connection *connection;
- u8 version_major;
- u8 version_minor;
};
+struct svc_hotplug {
+ struct work_struct work;
+ struct gb_connection *connection;
+ struct gb_svc_intf_hotplug_request data;
+};
+
static struct ida greybus_svc_device_id_map;
/*