]> git.baikalelectronics.ru Git - kernel.git/commit
staging: typec: tcpm: Set default state after error recovery based on port type
authorBadhri Jagan Sridharan <Badhri@google.com>
Fri, 11 Aug 2017 04:15:41 +0000 (21:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Aug 2017 22:57:16 +0000 (15:57 -0700)
commit6d06d160cab4bf38c0c2660028662ebbfcbdd061
treedba31812abd94f4c34cb4e5298bd77ce27dd679e
parent5dae33add6e11490e8cb4406d60f50aafb2f9e9d
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: Badhri Jagan Sridharan <Badhri@google.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/typec/tcpm.c