mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 01:21:49 +00:00
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>
This commit is contained in:
committed by
chrome-bot
parent
309289df45
commit
59ce941927
@@ -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)
|
||||
|
||||
@@ -273,4 +273,13 @@ void tcpc_alert_clear(int port);
|
||||
*/
|
||||
int tcpc_run(int port, int evt);
|
||||
|
||||
/**
|
||||
* Initialize board specific TCPC functions post TCPC initialization.
|
||||
*
|
||||
* @param port Type-C port number
|
||||
*
|
||||
* @return EC_SUCCESS or error
|
||||
*/
|
||||
int board_tcpc_post_init(int port) __attribute__((weak));
|
||||
|
||||
#endif /* __CROS_EC_USB_PD_TCPM_H */
|
||||
|
||||
Reference in New Issue
Block a user