MLK-16013-36 staging: typec: wait for cc change on ERROR_RECOVERY
authorLi Jun <jun.li@nxp.com>
Fri, 28 Jul 2017 10:05:46 +0000 (18:05 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:36:22 +0000 (15:36 -0500)
We should wait at least tErrorRecovery before move to unattached state.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
drivers/staging/typec/tcpm.c

index aa2206f..eaa79d3 100644 (file)
@@ -2946,12 +2946,12 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1,
        case PR_SWAP_SNK_SRC_ASSERT_RP:
        case PR_SWAP_SRC_SNK_TRANSITION_OFF:
        case PR_SWAP_SRC_SNK_SOURCE_OFF:
+       case ERROR_RECOVERY:
                /*
                 * CC state change is expected here; we just turned off power.
                 * Ignore it.
                 */
                break;
-
        default:
                if (tcpm_port_is_disconnected(port))
                        tcpm_set_state(port, unattached_state(port), 0);