diff options
author | Diana Z <dzigterman@chromium.org> | 2021-03-12 15:21:16 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-17 00:09:47 +0000 |
commit | 4d8bc2363d3323755d24ea71c0086adef92ccc7a (patch) | |
tree | 29f4b76ca8bf49310afecbd18e84d4862121284c /common/mock | |
parent | 5e6d9d3a85e5003106fa05ef93ccfad6aac88ae7 (diff) | |
download | chrome-ec-4d8bc2363d3323755d24ea71c0086adef92ccc7a.tar.gz |
TCPMv2: Preserve selected source current in FRS
When executing a fast role swap, ensure that any 3.0 A selected current
is preserved through the select_current_limit_rp in the TC layer.
Additionally, use this selected current to set our current limit when
first attaching as a source.
If FRS is disabled on a port, restore the default Rp value for the
board.
BRANCH=None
BUG=b:180434465
TEST=Check that a 3A FRS device loaded over 1.5 A is able to
successfully complete FRS
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I6e6b2f95066a3f8972664c6ac62b450e179e408d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2757096
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'common/mock')
-rw-r--r-- | common/mock/usb_tc_sm_mock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/mock/usb_tc_sm_mock.c b/common/mock/usb_tc_sm_mock.c index 07d861f4d4..259170d6bf 100644 --- a/common/mock/usb_tc_sm_mock.c +++ b/common/mock/usb_tc_sm_mock.c @@ -56,6 +56,10 @@ void typec_select_src_collision_rp(int port, enum tcpc_rp_value rp) mock_tc_port[port].lcl_rp = rp; } +void typec_select_src_current_limit_rp(int port, enum tcpc_rp_value rp) +{ +} + int tc_is_attached_src(int port) { return mock_tc_port[port].attached_src; |