aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/tcpm.h
diff options
context:
space:
mode:
authorKyle Tso <kyletso@google.com>2021-01-14 22:50:51 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-21 12:23:32 +0100
commit0908c5aca31eb5e0c72d7a5dba422629b88e877d (patch)
treec51b47c927a08bd141b3bab5b8819665e2f30972 /include/linux/usb/tcpm.h
parentdt-bindings: usb: qcom,dwc3: Add bindings for SM8150, SM8250, SM8350 (diff)
downloadlinux-dev-0908c5aca31eb5e0c72d7a5dba422629b88e877d.tar.xz
linux-dev-0908c5aca31eb5e0c72d7a5dba422629b88e877d.zip
usb: typec: tcpm: AMS and Collision Avoidance
This patch provides the implementation of Collision Avoidance introduced in PD3.0. The start of each Atomic Message Sequence (AMS) initiated by the port will be denied if the current AMS is not interruptible. The Source port will set the CC to SinkTxNG if it is going to initiate an AMS, and SinkTxOk otherwise. Meanwhile, any AMS initiated by a Sink port will be denied in TCPM if the port partner (Source) sets SinkTxNG except for HARD_RESET and SOFT_RESET. Tested-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Kyle Tso <kyletso@google.com> Link: https://lore.kernel.org/r/20210114145053.1952756-2-kyletso@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb/tcpm.h')
-rw-r--r--include/linux/usb/tcpm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/tcpm.h b/include/linux/usb/tcpm.h
index f4a18427f5c4..3af99f85e8b9 100644
--- a/include/linux/usb/tcpm.h
+++ b/include/linux/usb/tcpm.h
@@ -19,6 +19,10 @@ enum typec_cc_status {
TYPEC_CC_RP_3_0,
};
+/* Collision Avoidance */
+#define SINK_TX_NG TYPEC_CC_RP_1_5
+#define SINK_TX_OK TYPEC_CC_RP_3_0
+
enum typec_cc_polarity {
TYPEC_POLARITY_CC1,
TYPEC_POLARITY_CC2,