From 2e578056dbc117de3429a60dbb458acb36c78d6f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 3 Jan 2024 16:03:29 +0000 Subject: [PATCH] Revert "usb: typec: tcpm: fix cc role at port reset" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 1e35f074399dece73d5df11847d4a0d7a6f49434. Seems to break Pixel 6 testing so revert for now. Will need to come back later. Bug: 298207935 Reported-by: André Draszik Change-Id: I8fec8b7ae1b508b963c3bc78ae9308e791a2ef66 Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 49836fa33188dd4cdabe1df3dfb1ff589c0a3d9b) [ta: the change was removed in commit 5032efbbcf31 ("ANDROID: bring back typec charger changes."), add it again.] Signed-off-by: Tudor Ambarus --- drivers/usb/typec/tcpm/tcpm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 058d5b853b57..9a715cc86b07 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -4861,8 +4861,7 @@ static void run_state_machine(struct tcpm_port *port) break; case PORT_RESET: tcpm_reset_port(port); - tcpm_set_cc(port, tcpm_default_state(port) == SNK_UNATTACHED ? - TYPEC_CC_RD : tcpm_rp_cc(port)); + tcpm_set_cc(port, TYPEC_CC_OPEN); tcpm_set_state(port, PORT_RESET_WAIT_OFF, PD_T_ERROR_RECOVERY); break;