usb: typec: tcpci: add vconn over current fault handling to maxim_core
authorRD Babiera <rdbabiera@google.com>
Tue, 21 Nov 2023 20:38:48 +0000 (20:38 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Dec 2023 13:29:51 +0000 (22:29 +0900)
commit5e4c8814a431d21bfaf20b464134f40f2f81e152
treed70917cb479a5596b0343ff6d5c11b9dca815f18
parentdb9e54709895241dda23f9347f619afb15291353
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>
drivers/usb/typec/tcpm/tcpci_maxim_core.c
include/linux/usb/tcpci.h