staging: typec: tcpm: Check for Rp for tPDDebounce
authorBadhri Jagan Sridharan <badhri@google.com>
Mon, 28 Aug 2017 17:23:15 +0000 (10:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Aug 2017 06:21:10 +0000 (08:21 +0200)
commita0a3e04e6b2c7cee376511be1524127cdfed264d
tree29093c58b33a46cfc2981e72416fb54d1a98514d
parent02d5be466b68f65acc3263790ff2feb1c7ff2baf
staging: typec: tcpm: Check for Rp for tPDDebounce

According the spec, the following is the conditions for exiting Try.SNK
state:
"The port shall wait for tDRPTry and only then begin monitoring the CC1 and
CC2 pins for the SNK.Rp state. The port shall then transition to
Attached.SNK when the SNK.Rp state is detected on exactly one of the CC1
or CC2 pins for at least tPDDebounce and V BUS is detected. Alternatively,
the port shall transition to TryWait.SRC if SNK.Rp state is not detected
for 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