summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/control.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-06-22 16:42:26 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2015-06-23 23:16:15 -0700
commitcdee4f7505dbb06671a41f63b295d3d7680d760c (patch)
tree31dda554c994f8443a94d89dd29dd2b9377992df /drivers/staging/greybus/control.h
parentb08488bea5929f14b1e08d701652427bf63a9b47 (diff)
downloadlinux-cdee4f7505dbb06671a41f63b295d3d7680d760c.tar.bz2
greybus: Add control protocol support
Add control protocol driver that is responsible for handling operations on control CPort. The AP also needs to support incoming requests on its control port. Features not implemented yet are marked as TODO for now. NOTE: This also fixes cport-bundle-id to 0 and cport-id to 2 for control protocol. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/control.h')
-rw-r--r--drivers/staging/greybus/control.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/staging/greybus/control.h b/drivers/staging/greybus/control.h
new file mode 100644
index 000000000000..6e41a2b4c70d
--- /dev/null
+++ b/drivers/staging/greybus/control.h
@@ -0,0 +1,27 @@
+/*
+ * Greybus CPort control protocol
+ *
+ * Copyright 2015 Google Inc.
+ * Copyright 2015 Linaro Ltd.
+ *
+ * Released under the GPLv2 only.
+ */
+
+#ifndef __CONTROL_H
+#define __CONTROL_H
+
+struct gb_control {
+ struct gb_connection *connection;
+ u8 version_major;
+ u8 version_minor;
+};
+
+int gb_control_connected_operation(struct gb_control *control, u16 cport_id);
+int gb_control_disconnected_operation(struct gb_control *control, u16 cport_id);
+int gb_control_get_manifest_size_operation(struct gb_interface *intf);
+int gb_control_get_manifest_operation(struct gb_interface *intf, void *manifest,
+ size_t size);
+
+int gb_control_protocol_init(void);
+void gb_control_protocol_exit(void);
+#endif /* __CONTROL_H */