Skip to content

Commit 6d91017

Browse files
Xu Yanggregkh
authored andcommitted
usb: typec: tcpm: handle SRC_STARTUP state if cc changes
TCPM for DRP should do the same action as SRC_ATTACHED when cc changes in SRC_STARTUP state. Otherwise, TCPM will transition to SRC_UNATTACHED state which is not satisfied with the Type-C spec. Per Type-C spec: DRP port should move to Unattached.SNK instead of Unattached.SRC if sink removed. Fixes: 4b4e02c ("typec: tcpm: Move out of staging") cc: <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Acked-by: Heikki Krogerus <[email protected]> Signed-off-by: Xu Yang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0530087 commit 6d91017

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/typec/tcpm/tcpm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4876,6 +4876,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1,
48764876
tcpm_set_state(port, SRC_ATTACH_WAIT, 0);
48774877
break;
48784878
case SRC_ATTACHED:
4879+
case SRC_STARTUP:
48794880
case SRC_SEND_CAPABILITIES:
48804881
case SRC_READY:
48814882
if (tcpm_port_is_disconnected(port) ||

0 commit comments

Comments
 (0)