diff options
author | Diana Z <dzigterman@chromium.org> | 2020-10-09 13:42:42 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-21 00:26:39 +0000 |
commit | 49f4704e9a11d69e915bccb725ba509323925297 (patch) | |
tree | 32fc7394479f516904fe7ad81a6d5fea6133586e /util/ectool.c | |
parent | f420b2073e02a2e745bb4c43f4144cf60045b7be (diff) | |
download | chrome-ec-49f4704e9a11d69e915bccb725ba509323925297.tar.gz |
TCPMv2: Report partner PD revisions in TYPEC_STATUS
Gather and report both SOP and SOP' revisions for port partners.
BRANCH=None
BUG=b:167700356
TEST=on waddledoo, confirmed SOP and SOP' revisions were reported
correctly with:
- active cable and non-PD partner
- PD 3.0 dock and active cable
- PD 2.0 dock and active cable
- PD 3.0 and PD 2.0 partners with no e-mark cable
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I6448e5b80212b171a44864f90ae5cdfecbcb7244
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2473097
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'util/ectool.c')
-rw-r--r-- | util/ectool.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/ectool.c b/util/ectool.c index 09c27db530..bb4ea2cef5 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -9692,6 +9692,16 @@ int cmd_typec_status(int argc, char *argv[]) printf("Port events: 0x%08x\n", r->events); + if (r->sop_revision) + printf("SOP PD Rev: %d.%d\n", + PD_STATUS_REV_GET_MAJOR(r->sop_revision), + PD_STATUS_REV_GET_MINOR(r->sop_revision)); + + if (r->sop_prime_revision) + printf("SOP' PD Rev: %d.%d\n", + PD_STATUS_REV_GET_MAJOR(r->sop_prime_revision), + PD_STATUS_REV_GET_MINOR(r->sop_prime_revision)); + return 0; } |