OSDN Git Service

greybus: operation: allow drivers to define custom timeouts
authorJohan Hovold <johan@hovoldconsulting.com>
Tue, 14 Jul 2015 13:43:36 +0000 (15:43 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 15 Jul 2015 19:39:13 +0000 (12:39 -0700)
commit4f2c08aba792d4c778774e90e47865718eb1b7f8
tree2914b6557e54819140cd4e8c4068b27f91dcc87a
parent5a3be769e92ea993f8a8c27b89571c276d874733
greybus: operation: allow drivers to define custom timeouts

Add new interface gb_operation_request_send_sync_timeout, which allows
drivers to define a custom operation timeout instead of the default
one-second timeout.

The timeout is expected to depend on protocol and operation and
therefore needs to be configurable.

Note that that a timeout of zero is used to wait indefinitely.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/operation.c
drivers/staging/greybus/operation.h