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
commitf53be0eaf0603324ea90eb352df0ffa18dde646a (patch)
tree67b25ae38bf642fd40b09a60fe8dde52b7fb17ff /drivers/staging/greybus/greybus_protocols.h
parentf61908f94a9fc550d4619224263fff16cddcc830 (diff)
downloadop-kernel-dev-f53be0eaf0603324ea90eb352df0ffa18dde646a.zip
op-kernel-dev-f53be0eaf0603324ea90eb352df0ffa18dde646a.tar.gz
greybus: control: add interface suspend prepare operation
Add the AP implementation for the Greybus Control Interface Suspend Prepare Operation. AP uses this Operation during the Suspend transition to request the Interface to enter a low-power mode after it detects a subsequent UniPro link hibernation. 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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_protocols.h b/drivers/staging/greybus/greybus_protocols.h
index 1ae3350..cd64a99 100644
--- a/drivers/staging/greybus/greybus_protocols.h
+++ b/drivers/staging/greybus/greybus_protocols.h
@@ -130,6 +130,7 @@ struct gb_protocol_version_response {
#define GB_CONTROL_TYPE_BUNDLE_RESUME 0x10
#define GB_CONTROL_TYPE_BUNDLE_DEACTIVATE 0x11
#define GB_CONTROL_TYPE_BUNDLE_ACTIVATE 0x12
+#define GB_CONTROL_TYPE_INTF_SUSPEND_PREPARE 0x13
struct gb_control_version_request {
__u8 major;
@@ -214,6 +215,20 @@ struct gb_control_bundle_pm_response {
__u8 status;
} __packed;
+/*
+ * Interface Suspend Prepare and Deactivate Prepare operations use the same
+ * response layout and error codes. Define a single response structure and reuse
+ * it. Both operations have no payload.
+ */
+
+#define GB_CONTROL_INTF_PM_OK 0x00
+#define GB_CONTROL_INTF_PM_BUSY 0x01
+#define GB_CONTROL_INTF_PM_NA 0x02
+
+struct gb_control_intf_pm_response {
+ __u8 status;
+} __packed;
+
/* APBridge protocol */
/* request APB1 log */
OpenPOWER on IntegriCloud