summaryrefslogtreecommitdiff
path: root/include/usb_tc_sm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/usb_tc_sm.h')
-rw-r--r--include/usb_tc_sm.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/usb_tc_sm.h b/include/usb_tc_sm.h
index 322d3b3224..c797318b91 100644
--- a/include/usb_tc_sm.h
+++ b/include/usb_tc_sm.h
@@ -16,6 +16,12 @@
#define TC_CLR_FLAG(port, flag) atomic_clear(&tc[port].flags, (flag))
#define TC_CHK_FLAG(port, flag) (tc[port].flags & (flag))
+enum try_src_override_t {
+ TRY_SRC_OVERRIDE_OFF,
+ TRY_SRC_OVERRIDE_ON,
+ TRY_SRC_NO_OVERRIDE
+};
+
/*
* Type C supply voltage (mV)
*
@@ -335,6 +341,47 @@ void tc_start_event_loop(int port);
*/
void tc_pause_event_loop(int port);
+/**
+ * Allow system to override the control of TrySrc
+ *
+ * @param en TRY_SRC_OVERRIDE_OFF - Force TrySrc OFF
+ * TRY_SRC_OVERRIDE_ON - Force TrySrc ON
+ * TRY_SRC_NO_OVERRIDE - Allow state machine to control TrySrc
+ */
+void tc_try_src_override(enum try_src_override_t ov);
+
+/**
+ * Get state of try_src_override
+ *
+ * @return TRY_SRC_OVERRIDE_OFF - TrySrc is forced OFF
+ * TRY_SRC_OVERRIDE_ON - TrySrc is forced ON
+ * TRY_SRC_NO_OVERRIDE - TypeC state machine controls TrySrc
+ */
+enum try_src_override_t tc_get_try_src_override(void);
+
+/**
+ * Returns the name of the current typeC state
+ *
+ * @param port USB-C port number
+ * @return name of current typeC state
+ */
+const char *tc_get_current_state(int port);
+
+/**
+ * Returns the flag mask of the typeC state machine
+ *
+ * @param port USB-C port number
+ * @return flag mask of the typeC state machine
+ */
+uint32_t tc_get_flags(int port);
+
+/*
+ * Prints the rw hash and sysjump image string.
+ *
+ * @param port USB-C port number
+ */
+void tc_print_dev_info(int port);
+
#ifdef CONFIG_USB_TYPEC_CTVPD
/**