summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2018-01-10 11:34:31 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-02-01 00:48:19 +0000
commit7e35f6e9579e57bc0c100c7fe1979220356795aa (patch)
tree79bed93f4c21990d4a8ca22560fda63bca5804f7 /include
parenta51551f4da4aeb4c7daf780c522afe3294697592 (diff)
downloadchrome-ec-7e35f6e9579e57bc0c100c7fe1979220356795aa.tar.gz
ccd: 'pp polling' vendor command option
When implementing 'ccd open' and 'ccd unlock' through gsctool, we need to be able to pass to the host the state of the physical presences state machine regarding the expected user action (pressing the PP button). Two new VENDOR_CC_CCD subcommands are being added: CCDV_PP_POLL_OPEN and CCDV_PP_UNLOCK. In response to these commands, the Cr50 always returns VENDOR_RC_SUCCESS return code and a single byte payload showing the CCD and PP state: - CCDPP_CLOSED - PP process is not running, CCD closed. Maybe user missed a button press deadline. - CCDPP_AWAITING_PRESS (self explanatory) - CCDPP_BETWEEN_PRESSES (self explanatory) - CCDPP_PP_DONE - CCD is opened/unlocked (as per user request), PP process succeeded. BRANCH=cr50 BUG=b:62537474 TEST=with the upcoming change to gsctool verified that PP states are properly conveyed to the user. Change-Id: I97b1fef4440eea93c5c5ac01b7c60bfce9a4595c Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/861001 Reviewed-by: Randall Spangler <rspangler@chromium.org> (cherry picked from commit 8347907c46df8186d339c10dcca1b1c5f8f641ed) Reviewed-on: https://chromium-review.googlesource.com/896783
Diffstat (limited to 'include')
-rw-r--r--include/ccd_config.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/ccd_config.h b/include/ccd_config.h
index 5a1cb5add9..76d54ac103 100644
--- a/include/ccd_config.h
+++ b/include/ccd_config.h
@@ -107,6 +107,15 @@ enum ccd_vendor_subcommands {
CCDV_OPEN = 1,
CCDV_UNLOCK = 2,
CCDV_LOCK = 3,
+ CCDV_PP_POLL_UNLOCK = 4,
+ CCDV_PP_POLL_OPEN = 5,
+};
+
+enum ccd_pp_state {
+ CCD_PP_CLOSED = 0,
+ CCD_PP_AWAITING_PRESS = 1,
+ CCD_PP_BETWEEN_PRESSES = 2,
+ CCD_PP_DONE = 3
};
/**