mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
FROMLIST: usb: typec: tcpm: support sink port for debounce
When both CC1 and CC2 pins are simultaneously pulled up, it often leads to the double Rp to Vbus cable being stuck in the SNK_ATTACH_WAIT state. And the state machine fails to transition to the SNK_ATTACHED state. Therefore, it is recommended to focus on transitioning the sink port to the SNK_DEBOUNCED state instead. By doing so, the desired outcome can be achieved more effectively. [ 134.525750] VBUS on [ 134.713240] CC1: 0 -> 3, CC2: 0 -> 3 [state TOGGLING, polarity 0, connected] [ 134.713249] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS] Change-Id: Ib21f4f0322a193678a5f22007a515b3b19772b40 Signed-off-by: Michael Wu <michael@allwinnertech.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> Link: https://lore.kernel.org/linux-usb/20240312011300.75081-1-michael@allwinnertech.com/
This commit is contained in:
@@ -4256,6 +4256,8 @@ static void run_state_machine(struct tcpm_port *port)
|
||||
else if (tcpm_port_is_disconnected(port))
|
||||
tcpm_set_state(port, SNK_UNATTACHED,
|
||||
PD_T_PD_DEBOUNCE);
|
||||
else if (tcpm_port_is_sink(port))
|
||||
tcpm_set_state(port, SNK_DEBOUNCED, 0);
|
||||
break;
|
||||
case SNK_DEBOUNCED:
|
||||
if (tcpm_port_is_disconnected(port))
|
||||
|
||||
Reference in New Issue
Block a user