From: Badhri Jagan Sridharan Date: Mon, 28 Aug 2017 17:23:22 +0000 (-0700) Subject: staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED X-Git-Tag: v4.14-rc1~148^2~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56277035c294ec4877aabc97febcf55a2b3ef397;p=platform%2Fkernel%2Flinux-rpi.git staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED When VBUS is not discovered within PD_T_PS_SOURCE_ON although Rp is detected on CC, TCPM switches the port to SNK_UNATTACHED state. SNK_UNATTACHED, however does not force TYPEC_CC_OPEN which makes the partner(source) to think that it is connected. To overcome this issue, force the port into PORT_RESET state to make sure the CC lines are open. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index cbfb1a4..2ce02ab 100644 --- a/drivers/staging/typec/tcpm.c +++ b/drivers/staging/typec/tcpm.c @@ -2385,7 +2385,7 @@ static void run_state_machine(struct tcpm_port *port) 0); else /* Wait for VBUS, but not forever */ - tcpm_set_state(port, SNK_UNATTACHED, PD_T_PS_SOURCE_ON); + tcpm_set_state(port, PORT_RESET, PD_T_PS_SOURCE_ON); break; case SRC_TRY: