summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTodd Broch <tbroch@chromium.org>2015-01-16 11:14:51 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-28 11:13:50 +0000
commit4ce63213f004fcb35e63f8857b60c8b489403fe0 (patch)
treee27457d0b9781d83fe3ba8fb76a9ec5b7421b91b /include
parent3a1b5ec3dd91bac4833167cedcd68d9d4936ce6b (diff)
downloadchrome-ec-4ce63213f004fcb35e63f8857b60c8b489403fe0.tar.gz
pd: refactor object position index.
Renaming this to 'opos' for consistency with USP-PD specifications 'object position' in VDM header. Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=samus BUG=chrome-os-partner:35495 TEST=manual, On hoho 1. Still successfully enter default mode DP 2. Using ectool's pdgetmode pdsetmode can successfully enter/exit other modes 3. Works across hard & soft resets Change-Id: I08cb8e003ced4de481adcb503bcba3437ebb1ab7 Reviewed-on: https://chromium-review.googlesource.com/241718 Reviewed-by: Alec Berg <alecaberg@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/ec_commands.h2
-rw-r--r--include/usb_pd.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 18e9e454f7..926e317eee 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -2930,7 +2930,7 @@ struct ec_params_usb_pd_get_mode_request {
struct ec_params_usb_pd_get_mode_response {
uint16_t svid; /* SVID */
uint8_t active; /* Active SVID */
- uint8_t idx; /* Index of active mode VDO. Ignored if !active */
+ uint8_t opos; /* Object Position */
uint32_t vdo[6]; /* Mode VDOs */
} __packed;
diff --git a/include/usb_pd.h b/include/usb_pd.h
index f2358d02b3..9e9ae56d4c 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -189,9 +189,12 @@ extern const struct svdm_response svdm_rsp;
extern const struct svdm_amode_fx supported_modes[];
extern const int supported_modes_cnt;
+/* DFP data needed to support alternate mode entry and exit */
struct svdm_amode_data {
const struct svdm_amode_fx *fx;
- int index;
+ /* VDM object position */
+ int opos;
+ /* mode capabilities specific to SVID amode. */
uint32_t mode_caps;
};