diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2017-08-21 13:29:55 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-21 22:03:53 -0700 |
commit | 59ce941927d5ccf332498e4326560e46095ca0e3 (patch) | |
tree | 74dbc3c7c44c97f2a9633a1b30c80bd69b6bdee5 /driver/tcpm/tcpm.h | |
parent | 309289df45c35af0e935b1a965412e4dacaad036 (diff) | |
download | chrome-ec-59ce941927d5ccf332498e4326560e46095ca0e3.tar.gz |
tcpm: Configure board specific post TCPC init
Some boards have TCPC configurations post TCPC initialization.
Added code to support those configurations.
BUG=b:64531818
BRANCH=glkrvp
TEST=Manually verified on GLKRVP. External GPIOs of PTN5110
are configured properly.
Change-Id: I3da1c171839f22cf183dacf390cf033becddce0f
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/624557
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'driver/tcpm/tcpm.h')
-rw-r--r-- | driver/tcpm/tcpm.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/driver/tcpm/tcpm.h b/driver/tcpm/tcpm.h index b2d8aef2ea..34f1138c57 100644 --- a/driver/tcpm/tcpm.h +++ b/driver/tcpm/tcpm.h @@ -72,7 +72,17 @@ static inline void tcpc_lock(int port, int lock) /* TCPM driver wrapper function */ static inline int tcpm_init(int port) { - return tcpc_config[port].drv->init(port); + int rv; + + rv = tcpc_config[port].drv->init(port); + if (rv) + return rv; + + /* Board specific post TCPC init */ + if (board_tcpc_post_init) + rv = board_tcpc_post_init(port); + + return rv; } static inline int tcpm_release(int port) |