summaryrefslogtreecommitdiff
path: root/include/usbc_ppc.h
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-01-25 10:45:22 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-01-31 11:14:01 -0800
commit760caca89bfe3d91fe7d66b8d435a105664fd0d3 (patch)
treef965fbf49a3bfe6294f2c341a01a90ddaed06f75 /include/usbc_ppc.h
parentb245e71e82d4da9b1be27c6de45da1d2bd460751 (diff)
downloadchrome-ec-760caca89bfe3d91fe7d66b8d435a105664fd0d3.tar.gz
usb pd: Adding PPC vbus discharge path
Boards with a PPC will use the PPC to discharge the VBUS line instead of the TCPC or GPIO discharge path. BRANCH=none BUG=b:72179253 TEST=Fall time after device removal on grunt within spec now Change-Id: I822923a1cedb32a20efc3610cce4437ade3387f0 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/886563 Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'include/usbc_ppc.h')
-rw-r--r--include/usbc_ppc.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/usbc_ppc.h b/include/usbc_ppc.h
index c005540e99..4fbb913a11 100644
--- a/include/usbc_ppc.h
+++ b/include/usbc_ppc.h
@@ -57,6 +57,15 @@ struct ppc_drv {
*/
int (*set_vbus_source_current_limit)(int port, enum tcpc_rp_value rp);
+ /**
+ * Discharge PD VBUS on src/sink disconnect & power role swap
+ *
+ * @param port: The Type-C port number.
+ * @param enable: 1 -> discharge vbus, 0 -> stop discharging vbus
+ * @return EC_SUCCESS on success, error otherwise.
+ */
+ int (*discharge_vbus)(int port, int enable);
+
#ifdef CONFIG_CMD_PPC_DUMP
/**
* Perform a register dump of the PPC.
@@ -131,6 +140,15 @@ int ppc_is_sourcing_vbus(int port);
int ppc_set_vbus_source_current_limit(int port, enum tcpc_rp_value rp);
/**
+ * Discharge PD VBUS on src/sink disconnect & power role swap
+ *
+ * @param port: The Type-C port number.
+ * @param enable: 1 -> discharge vbus, 0 -> stop discharging vbus
+ * @return EC_SUCCESS on success, error otherwise.
+ */
+int ppc_discharge_vbus(int port, int enable);
+
+/**
* Turn on/off the charge path FET, such that current flows into the
* system.
*