MLK-17573-1 tcpc: Add interface to set UFP mode
authorYe Li <ye.li@nxp.com>
Sun, 11 Feb 2018 10:42:31 +0000 (02:42 -0800)
committerYe Li <ye.li@nxp.com>
Sat, 24 Feb 2018 08:05:10 +0000 (00:05 -0800)
commit0da18c57a96bf31bd05aca8e884161c811f8a423
tree408446ae14fce183acb6e29edd4d5c3c007b8bd8
parent37a10a34f056fc0d325b5c2d2105e269185b00a3
MLK-17573-1 tcpc: Add interface to set UFP mode

Add a interface to set UFP mode, so when running as device mode, the
board level codes can use it to configure the TCPC port to UFP mode.

Since we have supported PD charge for dead battery, so add check before
applying UFP or DFP mode.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Jun Li <jun.li@nxp.com>
board/freescale/common/tcpc.c
board/freescale/common/tcpc.h