diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-05-11 10:17:56 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-05-13 15:30:05 +0200 |
commit | ca1f8f809024db5fb1434d7e864a356fd5132c03 (patch) | |
tree | af90354353b00609bcad5cd7c6cb403605450b6c /drivers/staging/greybus/connection.h | |
parent | 0e9b41ab98ec8065263e6def8baebff1c1cd2c31 (diff) |
greybus: connection: add offloaded connection flag
Add an offloaded connection flag, which is used to mark a connection as
offloaded and prevent drivers from initiating operation over it.
This will be used for the audio and camera data connections.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/connection.h')
-rw-r--r-- | drivers/staging/greybus/connection.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/greybus/connection.h b/drivers/staging/greybus/connection.h index bb25abf188f3..c740c3816f0d 100644 --- a/drivers/staging/greybus/connection.h +++ b/drivers/staging/greybus/connection.h @@ -15,6 +15,7 @@ #define GB_CONNECTION_FLAG_CSD BIT(0) #define GB_CONNECTION_FLAG_NO_FLOWCTRL BIT(1) +#define GB_CONNECTION_FLAG_OFFLOADED BIT(2) enum gb_connection_state { GB_CONNECTION_STATE_INVALID = 0, @@ -95,6 +96,11 @@ gb_connection_flow_control_disabled(struct gb_connection *connection) return connection->flags & GB_CONNECTION_FLAG_NO_FLOWCTRL; } +static inline bool gb_connection_is_offloaded(struct gb_connection *connection) +{ + return connection->flags & GB_CONNECTION_FLAG_OFFLOADED; +} + static inline void *gb_connection_get_data(struct gb_connection *connection) { return connection->private; |