summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2018-03-23 17:28:49 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-04-25 23:00:00 -0700
commita112d2495bbbd8da64659387b258f6608c65aa9e (patch)
tree2d4b104928c082b12236e16d92e3b22304e95792 /include
parentd8a1f5c14861f2d00d45d3c21f14f46a99fa1c94 (diff)
downloadchrome-ec-a112d2495bbbd8da64659387b258f6608c65aa9e.tar.gz
pd: Save power role in BBRAM.
In order to re-initialize our PD state variables properly following a reset, we need to save our current power role. This commit adds a bit in the BBRAM PD flags for the power role. BUG=b:71333840,chromium:805040 BRANCH=None TEST=Add code to save data role and restore both roles, verify that both are saved accordingly. Change-Id: I156ae8179c8e12c63322132d1f0078990bd215f8 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/979264 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/usb_pd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index 3d87edab9f..33a8c79121 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -736,6 +736,7 @@ enum pd_states {
/* Per-port battery backed RAM flags */
#define PD_BBRMFLG_EXPLICIT_CONTRACT (1 << 0)
+#define PD_BBRMFLG_POWER_ROLE (1 << 1)
enum pd_cc_states {
PD_CC_NONE,