summaryrefslogtreecommitdiff
path: root/include/usbc_ppc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/usbc_ppc.h')
-rw-r--r--include/usbc_ppc.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/usbc_ppc.h b/include/usbc_ppc.h
index 05e671728a..f5b72742d2 100644
--- a/include/usbc_ppc.h
+++ b/include/usbc_ppc.h
@@ -56,6 +56,24 @@ struct ppc_drv {
*/
int (*reg_dump)(int port);
#endif /* defined(CONFIG_CMD_PPC_DUMP) */
+
+#ifdef CONFIG_USB_PD_VBUS_DETECT_PPC
+ /*
+ * TODO(aaboagye): In order for VBUS detection to work properly for our
+ * system, we need to enable VBUS interrupts and send the appropriate
+ * notifications.
+ */
+
+ /**
+ * Determine if VBUS is present or not.
+ *
+ * @param port: The Type-C port number.
+ * @param vbus_present: 1: VBUS is present. 0: VBUS is not present.
+ * @return EC_SUCCESS if able to determine VBUS status, otherwise an
+ * error.
+ */
+ int (*is_vbus_present)(int port, int *vbus_present);
+#endif /* defined(CONFIG_USB_PD_VBUS_DETECT_PPC) */
};
struct ppc_config_t {
@@ -68,6 +86,16 @@ extern const struct ppc_config_t ppc_chips[];
extern const unsigned int ppc_cnt;
/**
+ * Determine if VBUS is present or not.
+ *
+ * @param port: The Type-C port number.
+ * @param vbus_present: 1: VBUS is present. 0: VBUS is not present.
+ * @return EC_SUCCESS if able to determine VBUS status, otherwise an
+ * error.
+ */
+int ppc_is_vbus_present(int port, int *vbus_present);
+
+/**
* Is the port sourcing Vbus?
*
* @param port: The Type-C port number.