#define GB_SVC_TYPE_INTF_RESET 0x06
#define GB_SVC_TYPE_CONN_CREATE 0x07
#define GB_SVC_TYPE_CONN_DESTROY 0x08
+#define GB_SVC_TYPE_ROUTE_CREATE 0x0b
/* SVC version request/response have same payload as gb_protocol_version_response */
};
/* connection destroy response has no payload */
+struct gb_svc_route_create_request {
+ __u8 intf1_id;
+ __u8 dev1_id;
+ __u8 intf2_id;
+ __u8 dev2_id;
+};
+
/* UART */
/* Version of the Greybus UART protocol we support */
&request, sizeof(request), NULL, 0);
}
+static int route_create_operation(struct gb_svc *svc, u8 intf1_id, u8 dev1_id,
+ u8 intf2_id, u8 dev2_id)
+{
+ struct gb_svc_route_create_request request;
+
+ request.intf1_id = intf1_id;
+ request.dev1_id = dev1_id;
+ request.intf2_id = intf2_id;
+ request.dev2_id = dev2_id;
+
+ return gb_operation_sync(svc->connection, GB_SVC_TYPE_ROUTE_CREATE,
+ &request, sizeof(request), NULL, 0);
+}
+
int gb_svc_intf_device_id(struct gb_svc *svc, u8 intf_id, u8 device_id)
{
return intf_device_id_operation(svc, intf_id, device_id);
}
EXPORT_SYMBOL_GPL(gb_svc_connection_destroy);
+int gb_svc_route_create(struct gb_svc *svc, u8 intf1_id, u8 dev1_id,
+ u8 intf2_id, u8 dev2_id) {
+ return route_create_operation(svc, intf1_id, dev1_id,
+ intf2_id, dev2_id);
+}
+EXPORT_SYMBOL_GPL(gb_svc_route_create);
+
static int gb_svc_version_request(struct gb_operation *op)
{
struct gb_connection *connection = op->connection;