diff options
author | Keith Short <keithshort@chromium.org> | 2018-12-19 16:17:28 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-01-08 01:59:12 -0800 |
commit | 90d177e3f0ae729bea7e24934a3c6ef9f2520d45 (patch) | |
tree | da02f562f4d768beb09aaf198c252972347c232b /include/ccd_config.h | |
parent | 5079009d35d8900bb030cbc7d9ebc34cf3ad1696 (diff) | |
download | chrome-ec-90d177e3f0ae729bea7e24934a3c6ef9f2520d45.tar.gz |
cr50: Changes to support closed source EC factory mode
Drives OEM specific GPIOs to enable and disable factory mode to a closed
source EC.
BUG=b:118683718
BRANCH=none
TEST=make buildall. Verified GPIO states with scope in both factory mode
enable and disable conditions. Verified GPIO states are reapplied
correctly after reboot, deep sleep, and power cycle.
Change-Id: I9bc547504478fded5f95c515027e1da0f245d524
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1358733
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'include/ccd_config.h')
-rw-r--r-- | include/ccd_config.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/ccd_config.h b/include/ccd_config.h index 5f21479cef..e670eb012a 100644 --- a/include/ccd_config.h +++ b/include/ccd_config.h @@ -39,6 +39,11 @@ enum ccd_flag { */ CCD_FLAG_PASSWORD_SET_WHEN_UNLOCKED = (1 << 1), + /* + * Factory mode state + */ + CCD_FLAG_FACTORY_MODE_ENABLED = (1 << 2), + /* (flags in the middle are unused) */ /* Flags that can be set via ccd_set_flags(); fill from top down */ @@ -279,6 +284,13 @@ enum ccd_state ccd_get_state(void); */ void ccd_disable(void); +/** + * Get the factory mode state. + * + * @return 0 if factory mode is disabled, !=0 if factory mode is enabled. + */ +int ccd_get_factory_mode(void); + /* Flags for ccd_reset_config() */ enum ccd_reset_config_flags { /* Also reset test lab flag */ |