summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@google.com>2017-08-24 15:40:58 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-02-12 19:49:35 +0000
commitf452165c2380a74e3929de0cf6655fee88264a8a (patch)
treed0d770abb1951c27bf0ef2afa510e045354bf29c
parent58fd575f2105e46d0846d59f66a919a8620186ec (diff)
downloadchrome-ec-f452165c2380a74e3929de0cf6655fee88264a8a.tar.gz
anx3429: read chip firmware version during init
fetching the chip firmware version toward the end of the chip anx74xx_tcpm_init() sequence is a good place to do this. we need this info in any case and this is a safe place to access device registers and cache the values. subsequent chip firmware queries typically return the cached value. also, tcpci_tcpm_init() is already structured this way. TEST=verified with follow-up CL that firmware update succeeds and new version is reported BRANCH=none BUG=b:35586895 Change-Id: If3a7ac37dc978db655b5dfb9c9df0756d08162d9 Signed-off-by: Duncan Laurie <dlaurie@google.com> Original-Commit-Id: e4997a631e129df3d171da16de9504810891744c Original-Change-Id: Ic3fd07bbf8a220bfd506d59d8a1f3ea25b14e94c Original-Signed-off-by: Caveh Jalali <caveh@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/634513 Original-Reviewed-by: Shawn N <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/914657
-rw-r--r--driver/tcpm/anx74xx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/driver/tcpm/anx74xx.c b/driver/tcpm/anx74xx.c
index 74de3ba6b0..e2c1081ceb 100644
--- a/driver/tcpm/anx74xx.c
+++ b/driver/tcpm/anx74xx.c
@@ -1057,6 +1057,8 @@ static int anx74xx_tcpm_init(int port)
if (rv)
return EC_ERROR_UNKNOWN;
+ tcpm_get_chip_info(port, 1, NULL);
+
return EC_SUCCESS;
}