summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.h
diff options
context:
space:
mode:
authorJohan Hovold2016-05-27 17:26:25 +0200
committerGreg Kroah-Hartman2016-05-27 21:19:29 +0200
commitaca7aab39aa2d69d0a5b1cfc9319506b7c26b79d (patch)
tree4dc3e91a26cdd335d578971233899a35ba607961 /drivers/staging/greybus/connection.h
parentgreybus: interface: avoid I/O to bootrom during removal (diff)
downloadkernel-qcow2-linux-aca7aab39aa2d69d0a5b1cfc9319506b7c26b79d.tar.gz
kernel-qcow2-linux-aca7aab39aa2d69d0a5b1cfc9319506b7c26b79d.tar.xz
kernel-qcow2-linux-aca7aab39aa2d69d0a5b1cfc9319506b7c26b79d.zip
greybus: connection: add control connection flag
Add control connection flag which will be set for control connections. Also add a helper function to test if the flag is set. 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/connection.h')
-rw-r--r--drivers/staging/greybus/connection.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/greybus/connection.h b/drivers/staging/greybus/connection.h
index f1592391acf1..6120c088648a 100644
--- a/drivers/staging/greybus/connection.h
+++ b/drivers/staging/greybus/connection.h
@@ -17,6 +17,7 @@
#define GB_CONNECTION_FLAG_NO_FLOWCTRL BIT(1)
#define GB_CONNECTION_FLAG_OFFLOADED BIT(2)
#define GB_CONNECTION_FLAG_CDSI1 BIT(3)
+#define GB_CONNECTION_FLAG_CONTROL BIT(4)
enum gb_connection_state {
GB_CONNECTION_STATE_INVALID = 0,
@@ -104,6 +105,11 @@ static inline bool gb_connection_is_offloaded(struct gb_connection *connection)
return connection->flags & GB_CONNECTION_FLAG_OFFLOADED;
}
+static inline bool gb_connection_is_control(struct gb_connection *connection)
+{
+ return connection->flags & GB_CONNECTION_FLAG_CONTROL;
+}
+
static inline void *gb_connection_get_data(struct gb_connection *connection)
{
return connection->private;