diff options
author | Todd Broch <tbroch@chromium.org> | 2015-01-16 11:14:51 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-28 11:13:50 +0000 |
commit | 4ce63213f004fcb35e63f8857b60c8b489403fe0 (patch) | |
tree | e27457d0b9781d83fe3ba8fb76a9ec5b7421b91b /util | |
parent | 3a1b5ec3dd91bac4833167cedcd68d9d4936ce6b (diff) | |
download | chrome-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 'util')
-rw-r--r-- | util/ectool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/ectool.c b/util/ectool.c index f98a98a943..de1b378fdc 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -876,7 +876,7 @@ static int in_gfu_mode(int *opos, int port) } } - return r->active && ((r->idx + 1) == *opos); + return r->active && (r->opos == *opos); } /** @@ -1168,7 +1168,7 @@ int cmd_pd_get_amode(int argc, char *argv[]) printf("%cSVID:0x%04x ", (r->active) ? '*' : ' ', r->svid); for (i = 0; i < PDO_MODES; i++) { - printf("%c0x%08x ", (r->active && (r->idx == i)) ? + printf("%c0x%08x ", (r->active && (r->opos == i + 1)) ? '*' : ' ', r->vdo[i]); } printf("\n"); |