summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2021-06-22 12:33:32 -0700
committerCommit Bot <commit-bot@chromium.org>2021-07-08 21:39:39 +0000
commit42f5279c008f451db480716162d8cc5a657bc93a (patch)
treedb7a6b7502afc22ad13868ad0a44fb10296c42e2 /include
parent77efdefdc384225861a83c3b1539339c103cd3b9 (diff)
downloadchrome-ec-42f5279c008f451db480716162d8cc5a657bc93a.tar.gz
TCPMv2: Add new override function for getting default Rp
This CL addes a new overridable function typec_get_default_current_limit_rp() which is used in place of CONFIG_USB_PD_PULLUP to retrieve the correct Rp value to reflect the current limit. This functionality is required for boards which are not per port symmetric. Unless this function if overridden in a board/basebard specific file, there is no change in functionality from present design. BUG=b:191793195 BRANCH=quiche TEST=verfied on Gingerbread that Rp = 3.0A is selected for C0 and Rp = 1.5A is selected for port C1. Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I9ec9daa563f6b4f551b4890ae7a56767f7c26764 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2980435 Commit-Queue: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/usb_pd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index c7d16aed52..a0a4c9e790 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -3361,6 +3361,14 @@ __override_proto enum ec_pd_port_location board_get_pd_port_location(int port);
void typec_select_src_current_limit_rp(int port, enum tcpc_rp_value rp);
/**
+ * Called to get a port's default current limit Rp.
+ *
+ * @param port The PD port number
+ * @return rp Rp is the Current Limit to advertise
+ */
+__override_proto int typec_get_default_current_limit_rp(int port);
+
+/**
* Called to cache Source Collision Rp
* A call to typec_update_cc will actually update the hardware to reflect the
* cache.