mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
usb: typec: tcpm: handle SRC_STARTUP state if cc changes
commit 6d91017a295e9790eec02c4e43f020cdb55f5d98 upstream.
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: 4b4e02c831 ("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]>
This commit is contained in:
parent
b53aa224ad
commit
9d93cfdaf8
1 changed files with 1 additions and 0 deletions
|
|
@ -3679,6 +3679,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1,
|
|||
tcpm_set_state(port, SRC_ATTACH_WAIT, 0);
|
||||
break;
|
||||
case SRC_ATTACHED:
|
||||
case SRC_STARTUP:
|
||||
case SRC_SEND_CAPABILITIES:
|
||||
case SRC_READY:
|
||||
if (tcpm_port_is_disconnected(port) ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue