summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/control.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-05-27 17:26:26 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-05-27 12:19:29 -0700
commit197616e227b5b562814828df4dac9477e27b0149 (patch)
tree3de269658a3bb33d8f9f8d75882d5c242388cead /drivers/staging/greybus/control.c
parentaca7aab39aa2d69d0a5b1cfc9319506b7c26b79d (diff)
downloadop-kernel-dev-197616e227b5b562814828df4dac9477e27b0149.zip
op-kernel-dev-197616e227b5b562814828df4dac9477e27b0149.tar.gz
greybus: control: implement disconnecting operation
Implement the new disconnecting control operation needed for proper connection tear down. Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/control.c')
-rw-r--r--drivers/staging/greybus/control.c12
1 files changed, 12 insertions, 0 deletions
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,
OpenPOWER on IntegriCloud