Skip to content

Commit b717dfb

Browse files
Badhri Jagan Sridharangregkh
authored andcommitted
Revert "usb: typec: tcpm: fix cc role at port reset"
This reverts commit 1e35f07. Given that ERROR_RECOVERY calls into PORT_RESET for Hi-Zing the CC pins, setting CC pins to default state during PORT_RESET breaks error recovery. 4.5.2.2.2.1 ErrorRecovery State Requirements The port shall not drive VBUS or VCONN, and shall present a high-impedance to ground (above zOPEN) on its CC1 and CC2 pins. Hi-Zing the CC pins is the inteded behavior for PORT_RESET. CC pins are set to default state after tErrorRecovery in PORT_RESET_WAIT_OFF. 4.5.2.2.2.2 Exiting From ErrorRecovery State A Sink shall transition to Unattached.SNK after tErrorRecovery. A Source shall transition to Unattached.SRC after tErrorRecovery. Cc: stable@vger.kernel.org Cc: Frank Wang <frank.wang@rock-chips.com> Fixes: 1e35f07 ("usb: typec: tcpm: fix cc role at port reset") Signed-off-by: Badhri Jagan Sridharan <badhri@google.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20240117114742.2587779-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0321789 commit b717dfb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/usb/typec/tcpm/tcpm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4876,8 +4876,7 @@ static void run_state_machine(struct tcpm_port *port)
48764876
break;
48774877
case PORT_RESET:
48784878
tcpm_reset_port(port);
4879-
tcpm_set_cc(port, tcpm_default_state(port) == SNK_UNATTACHED ?
4880-
TYPEC_CC_RD : tcpm_rp_cc(port));
4879+
tcpm_set_cc(port, TYPEC_CC_OPEN);
48814880
tcpm_set_state(port, PORT_RESET_WAIT_OFF,
48824881
PD_T_ERROR_RECOVERY);
48834882
break;

0 commit comments

Comments
 (0)