summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/greybus_protocols.h
diff options
context:
space:
mode:
authorDavid Lin <dtwlin@google.com>2016-07-07 22:07:00 -0500
committerAlex Elder <elder@linaro.org>2016-07-08 14:56:28 -0500
commit2c8e8841e3b8cea90cc9b7172eebfdf90b06038a (patch)
tree72cafea7ab5b272759f9d505b89994deadbb1839 /drivers/staging/greybus/greybus_protocols.h
parent776165481d8ed956ccb92465f97ba727eed53e4c (diff)
downloadop-kernel-dev-2c8e8841e3b8cea90cc9b7172eebfdf90b06038a.zip
op-kernel-dev-2c8e8841e3b8cea90cc9b7172eebfdf90b06038a.tar.gz
greybus: control: add bundle suspend and resume preparations
Add the AP implementation for the Greybus Control Bundle Suspend Operation. This Operation is used to request a Bundle to enter the BUNDLE_SUSPENDED state, all Connections associated with this Bundle must be closed before issuing this operation. Add the AP implementation for the Greybus Control Bundle Resume Operation. This operation request a specific Bundle to transition from the BUNDLE_SUSPENDED state to the BUNDLE_ACTIVE state. Signed-off-by: David Lin <dtwlin@google.com> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/staging/greybus/greybus_protocols.h')
-rw-r--r--drivers/staging/greybus/greybus_protocols.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h
index 0043b91..3b6fd02 100644
--- a/drivers/staging/greybus/greybus_protocols.h
+++ b/drivers/staging/greybus/greybus_protocols.h
@@ -126,6 +126,8 @@ struct gb_protocol_version_response {
#define GB_CONTROL_TYPE_DISCONNECTING 0x0c
#define GB_CONTROL_TYPE_TIMESYNC_GET_LAST_EVENT 0x0d
#define GB_CONTROL_TYPE_MODE_SWITCH 0x0e
+#define GB_CONTROL_TYPE_BUNDLE_SUSPEND 0x0f
+#define GB_CONTROL_TYPE_BUNDLE_RESUME 0x10
struct gb_control_version_request {
__u8 major;
@@ -191,6 +193,25 @@ struct gb_control_timesync_get_last_event_response {
__le64 frame_time;
} __packed;
+/*
+ * All Bundle power management operations use the same request and response
+ * layout and status codes.
+ */
+
+#define GB_CONTROL_BUNDLE_PM_OK 0x00
+#define GB_CONTROL_BUNDLE_PM_INVAL 0x01
+#define GB_CONTROL_BUNDLE_PM_BUSY 0x02
+#define GB_CONTROL_BUNDLE_PM_FAIL 0x03
+#define GB_CONTROL_BUNDLE_PM_NA 0x04
+
+struct gb_control_bundle_pm_request {
+ __u8 bundle_id;
+} __packed;
+
+struct gb_control_bundle_pm_response {
+ __u8 status;
+} __packed;
+
/* APBridge protocol */
/* request APB1 log */
OpenPOWER on IntegriCloud