greybus: svc: Add support for the link config operation
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c
index 5c4ca79..ff865b3 100644
--- a/drivers/staging/greybus/svc.c
+++ b/drivers/staging/greybus/svc.c
@@ -270,6 +270,24 @@
}
}
+/* Creates bi-directional routes between the devices */
+int gb_svc_link_config(struct gb_svc *svc, u8 intf_id,
+ unsigned int burst, unsigned int gear,
+ unsigned int nlanes, unsigned int flags)
+{
+ struct gb_svc_link_config_request request;
+
+ request.intf_id = intf_id;
+ request.burst = burst;
+ request.gear = gear;
+ request.nlanes = nlanes;
+ request.flags = flags;
+
+ return gb_operation_sync(svc->connection, GB_SVC_TYPE_LINK_CONFIG,
+ &request, sizeof(request), NULL, 0);
+}
+EXPORT_SYMBOL_GPL(gb_svc_link_config);
+
static int gb_svc_version_request(struct gb_operation *op)
{
struct gb_connection *connection = op->connection;