summaryrefslogtreecommitdiff
path: root/include/usb_pd_dpm.h
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2021-02-03 15:11:34 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-16 19:25:05 +0000
commit874bf8213bf7012718e36112920c891c4504bea0 (patch)
tree11b2f04f2cb7e564cbeda793bb7fb335de1d28ea /include/usb_pd_dpm.h
parentfc0bc62708cb39fb4ad0d7cc25cf25f3742446b5 (diff)
downloadchrome-ec-874bf8213bf7012718e36112920c891c4504bea0.tar.gz
TCPMv2: Allocate FRS ports 3.0 A when needed
When there are no PD sinks requiring 3.0 A, any FRS ports which require that much current will have FRS detection enabled. If a PD sink requiring 3.0 A is attached, then FRS detection will be disabled on that port again. FRS port partners which require only USB or 1.5 A of current will always have FRS detection enabled. BRANCH=None BUG=b:141690755 TEST=on volteer-based system, verify: - FRS source partners requiring 1.5 A or less always have FRS detection enabled - FRS detection is disabled on detach - FRS source partner requiring 3.0 A has FRS detection enabled if no PD sink needing 3.0 A is present - Plugging in a 3.0 A PD sink disables FRS detection for the 3.0 A FRS partner - Unplugging a 3.0 A PD sink enables FRS detection for the 3.0 A FRS partner - When FRS occurs on 3.0 A port with detection enabled, partner is offered appropriate starting current in first source caps Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ib067ac7c1c2f4a6e64f36aeffd1b8dde5cb93760 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676084 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Eric Herrmann <eherrmann@chromium.org> Tested-by: Eric Herrmann <eherrmann@chromium.org>
Diffstat (limited to 'include/usb_pd_dpm.h')
-rw-r--r--include/usb_pd_dpm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/usb_pd_dpm.h b/include/usb_pd_dpm.h
index d0e49a7383..aa9608f9b4 100644
--- a/include/usb_pd_dpm.h
+++ b/include/usb_pd_dpm.h
@@ -76,6 +76,14 @@ void dpm_evaluate_sink_fixed_pdo(int port, uint32_t vsafe5v_pdo);
void dpm_remove_sink(int port);
/*
+ * Remove this port as a source, and reallocate reserved FRS maximum current
+ * as needed.
+ *
+ * @param port USB-C port number
+ */
+void dpm_remove_source(int port);
+
+/*
* Return the appropriate Source Capability PDO to offer this port
*
* @param src_pdo Will point to appropriate PDO to offer