summaryrefslogtreecommitdiff
path: root/include/usb_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/usb_common.h')
-rw-r--r--include/usb_common.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/usb_common.h b/include/usb_common.h
index 85260d539d..b35e5f27f9 100644
--- a/include/usb_common.h
+++ b/include/usb_common.h
@@ -10,6 +10,28 @@
#include "usb_pd_tcpm.h"
#include "task_id.h"
+enum pd_drp_next_states {
+ DRP_TC_DEFAULT,
+ DRP_TC_UNATTACHED_SNK,
+ DRP_TC_UNATTACHED_SRC,
+ DRP_TC_DRP_AUTO_TOGGLE
+};
+
+/**
+ * Returns the next state to transition to while in the drp auto toggle state.
+ *
+ * @param drp_sink_time timer for handling TOGGLE_OFF/FORCE_SINK mode when
+ * auto-toggle enabled. This is an in/out variable.
+ * @param power_role current power role
+ * @param drp_state dual role states
+ * @param cc1 value of CC1 set by tcpm_get_cc
+ * @param cc2 value of CC2 set by tcpm_get_cc
+ *
+ */
+enum pd_drp_next_states drp_auto_toggle_next_state(uint64_t *drp_sink_time,
+ enum pd_power_role power_role, enum pd_dual_role_states drp_state,
+ enum tcpc_cc_voltage_status cc1, enum tcpc_cc_voltage_status cc2);
+
/* Returns the battery percentage [0-100] of the system. */
int usb_get_battery_soc(void);