From: Jun Li Date: Tue, 16 Jan 2018 10:06:52 +0000 (+0800) Subject: MLK-17376 typec: support power source with 2 stages of capability X-Git-Tag: rel_imx_4.9.88_2.0.0_ga~96 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=11a0cc03cd13655399f0f9fef2d98e8746a59562;p=u-boot.git MLK-17376 typec: support power source with 2 stages of capability Some power delivery source send the source capability by 2 stages: 1st stage send the source capability message with only basic 5V PDO, after the 5V power session setup, 2nd stage it will send full source capabilities with all PDOs it can support, in this case, we should go on to process the following PD source cap to have a new power session setup. Signed-off-by: Li Jun --- diff --git a/board/freescale/common/tcpc.c b/board/freescale/common/tcpc.c index 2982ded75f..a674717d23 100644 --- a/board/freescale/common/tcpc.c +++ b/board/freescale/common/tcpc.c @@ -614,6 +614,7 @@ static void tcpc_pd_sink_process(struct tcpc_port *port) switch (pd_state) { case WAIT_SOURCE_CAP: + case SINK_READY: if (msgtype != PD_DATA_SOURCE_CAP) continue; @@ -656,9 +657,8 @@ static void tcpc_pd_sink_process(struct tcpc_port *port) continue; if (msgtype == PD_CTRL_PS_RDY) { - tcpc_log(port, "PD source ready! \n"); - pd_state = SINK_READY; - return; + tcpc_log(port, "PD source ready!\n"); + pd_state = SINK_READY; } break;