summaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorRD Babiera <rdbabiera@google.com>2023-11-21 20:38:48 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-04 22:29:51 +0900
commit5e4c8814a431d21bfaf20b464134f40f2f81e152 (patch)
treed70917cb479a5596b0343ff6d5c11b9dca815f18 /include/linux/usb
parentdb9e54709895241dda23f9347f619afb15291353 (diff)
downloadlinux-5e4c8814a431d21bfaf20b464134f40f2f81e152.tar.gz
linux-5e4c8814a431d21bfaf20b464134f40f2f81e152.tar.bz2
linux-5e4c8814a431d21bfaf20b464134f40f2f81e152.zip
usb: typec: tcpci: add vconn over current fault handling to maxim_core
Add TCPC_FAULT_STATUS_VCONN_OC constant and corresponding mask definition. Maxim TCPC is capable of detecting VConn over current faults, so add fault to alert mask. When a Vconn over current fault is triggered, put the port in an error recovery state via tcpm_port_error_recovery. Signed-off-by: RD Babiera <rdbabiera@google.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20231121203845.170234-6-rdbabiera@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/tcpci.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/usb/tcpci.h b/include/linux/usb/tcpci.h
index 83376473ac76..467e8045e9f8 100644
--- a/include/linux/usb/tcpci.h
+++ b/include/linux/usb/tcpci.h
@@ -36,7 +36,9 @@
#define TCPC_ALERT_MASK 0x12
#define TCPC_POWER_STATUS_MASK 0x14
-#define TCPC_FAULT_STATUS_MASK 0x15
+
+#define TCPC_FAULT_STATUS_MASK 0x15
+#define TCPC_FAULT_STATUS_MASK_VCONN_OC BIT(1)
#define TCPC_EXTENDED_STATUS_MASK 0x16
#define TCPC_EXTENDED_STATUS_MASK_VSAFE0V BIT(0)
@@ -104,6 +106,7 @@
#define TCPC_FAULT_STATUS 0x1f
#define TCPC_FAULT_STATUS_ALL_REG_RST_TO_DEFAULT BIT(7)
+#define TCPC_FAULT_STATUS_VCONN_OC BIT(1)
#define TCPC_ALERT_EXTENDED 0x21