staging: typec: tcpm: Comply with TryWait.SNK State
authorBadhri Jagan Sridharan <badhri@google.com>
Mon, 28 Aug 2017 17:23:17 +0000 (10:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Aug 2017 06:21:10 +0000 (08:21 +0200)
commitaf450ebb500ad2ba6f0bc85e3af315c3ea9a4efb
tree8e060e6d66021e86f39c05ae54ca1892df7d36f0
parent131c7d12ef21e16697098b282f65fcf20792eafe
staging: typec: tcpm: Comply with TryWait.SNK State

According to the spec:
"4.5.2.2.10.2 Exiting from TryWait.SNK State
The port shall transition to Attached.SNK after tCCDebounce if or when VBUS
is detected. Note the Source may initiate USB PD communications which will
cause brief periods of the SNK.Open state on both the CC1 and CC2 pins,
but this event will not exceed tPDDebounce. The port shall transition to
Unattached.SNK when the state of both of the CC1 and CC2 pins is SNK.Open
for at least tPDDebounce."

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/typec/tcpm.c