summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
authorMatt Delco <delco@google.com>2019-02-13 12:31:09 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-16 05:23:59 -0700
commitfa656b63a573c50f62ebdce46f70ee2fa2acbd23 (patch)
tree36808a7fdc6a2ad5250b6e7c99e8e62066f8136e /firmware/include
parent26f9bf2e1b2ebc0b9fb76281f22db6ac99db5d7e (diff)
downloadvboot-fa656b63a573c50f62ebdce46f70ee2fa2acbd23.tar.gz
vboot: add power button query functionality
The primary purpose of this change is to add a flag to VbExGetSwitches() so the current user physical presence (via the status of the power button) can be queried. The flags have also been renamed from the historical _INIT_ use to _SWITCH_ to reflect the current/actual API they're used with. BUG=b:124358784 BRANCH=none TEST=Locally built and flashed. Confirmed that the power button status can be queried when the power button is disabled. CQ-DEPEND=CL:1470273 Change-Id: I579ebe657ae35fb866eb30b466e8e8c16f54e584 Signed-off-by: Matt Delco <delco@google.com> Reviewed-on: https://chromium-review.googlesource.com/1471190 Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/vboot_api.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h
index 6e738dc4..8dc3f962 100644
--- a/firmware/include/vboot_api.h
+++ b/firmware/include/vboot_api.h
@@ -203,11 +203,12 @@ typedef struct VbCommonParams {
/* Flags for VbExGetSwitches() */
/* Recovery button was pressed at boot time. */
-#define VB_INIT_FLAG_REC_BUTTON_PRESSED 0x00000002
+#define VB_SWITCH_FLAG_REC_BUTTON_PRESSED 0x00000002
+/* Report if user is currently present (typically via power button) */
+#define VB_SWITCH_FLAG_PHYS_PRESENCE_PRESSED 0x00000004
/* Allow USB boot on transition to dev */
-#define VB_INIT_FLAG_ALLOW_USB_BOOT 0x00004000
-/* Mask of deprecated flags */
-#define VB_INIT_FLAG_DEPRECATED 0x0000BFFD
+#define VB_SWITCH_FLAG_ALLOW_USB_BOOT 0x00004000
+
/*
* Output flags for VbInitParams.out_flags. Used to indicate potential boot