提交 c749d4d0 编写于 作者: B Badhri Jagan Sridharan 提交者: Greg Kroah-Hartman

staging: typec: tcpm: Set default state after error recovery based on port type

While exiting ERROR_RECOVERY, choose default state based on the port
type instead of current power role.

Quoting from specification:

4.5.2.2.2 ErrorRecovery State
This state appears in Figure 4-12, Figure 4-13, Figure 4-14, Figure 4-15,
Figure 4-16 and Figure 4-17.
The ErrorRecovery state is where the port removes the terminations from
the CC1 and CC2 pins for tErrorRecovery followed by transitioning to the
appropriate Unattached.SNK or Unattached.SRC state based on port type.
This is the equivalent of forcing a detach event and looking for a new
attach.
Signed-off-by: NBadhri Jagan Sridharan <Badhri@google.com>
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3113bf1a
...@@ -3037,10 +3037,7 @@ static void _tcpm_pd_vbus_off(struct tcpm_port *port) ...@@ -3037,10 +3037,7 @@ static void _tcpm_pd_vbus_off(struct tcpm_port *port)
break; break;
case ERROR_RECOVERY_WAIT_OFF: case ERROR_RECOVERY_WAIT_OFF:
tcpm_set_state(port, tcpm_set_state(port, tcpm_default_state(port), 0);
port->pwr_role == TYPEC_SOURCE ?
SRC_UNATTACHED : SNK_UNATTACHED,
0);
break; break;
default: default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册