From 197616e227b5b562814828df4dac9477e27b0149 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 27 May 2016 17:26:26 +0200 Subject: greybus: control: implement disconnecting operation Implement the new disconnecting control operation needed for proper connection tear down. Reviewed-by: Viresh Kumar Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/control.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/staging/greybus/control.c') diff --git a/drivers/staging/greybus/control.c b/drivers/staging/greybus/control.c index a5effcf..c5cdf3c 100644 --- a/drivers/staging/greybus/control.c +++ b/drivers/staging/greybus/control.c @@ -149,6 +149,18 @@ int gb_control_disconnected_operation(struct gb_control *control, u16 cport_id) sizeof(request), NULL, 0); } +int gb_control_disconnecting_operation(struct gb_control *control, + u16 cport_id) +{ + struct gb_control_disconnecting_request request; + + request.cport_id = cpu_to_le16(cport_id); + + return gb_operation_sync(control->connection, + GB_CONTROL_TYPE_DISCONNECTING, &request, + sizeof(request), NULL, 0); +} + int gb_control_mode_switch_operation(struct gb_control *control) { return gb_operation_unidirectional(control->connection, -- cgit v1.1