diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-05-27 17:26:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-05-27 12:19:29 -0700 |
commit | 197616e227b5b562814828df4dac9477e27b0149 (patch) | |
tree | 3de269658a3bb33d8f9f8d75882d5c242388cead /drivers/staging/greybus/control.c | |
parent | aca7aab39aa2d69d0a5b1cfc9319506b7c26b79d (diff) | |
download | linux-197616e227b5b562814828df4dac9477e27b0149.tar.gz linux-197616e227b5b562814828df4dac9477e27b0149.tar.bz2 linux-197616e227b5b562814828df4dac9477e27b0149.zip |
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.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/staging/greybus/control.c b/drivers/staging/greybus/control.c index a5effcf09f56..c5cdf3c8ccf8 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, |