diff options
author | Jameson Thies <jthies@google.com> | 2022-04-22 21:47:14 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-02 22:56:32 +0000 |
commit | 96c7cd536662dea8ec2dd3509357c56c3174bfd7 (patch) | |
tree | fd2ea8e25555129fc6386ec73c7583f92766f477 /test | |
parent | 695640c14d2dccbc718872430608c731fd162ba9 (diff) | |
download | chrome-ec-96c7cd536662dea8ec2dd3509357c56c3174bfd7.tar.gz |
TCMPV2: Add state to send Status extended messages
When a USB PD partner sends a Get_Status message, the EC should respond
with a Status message. This CL adds the Status message response and
creates a new function in usb_pd_dpm which will be used to build the
Status Data Block (SDB).
BUG=b:227236917
TEST=triggered Status message and saw that it correctly sent data from a
modified dpm_get_status_msg function on a twinkie.
BRANCH=None
Signed-off-by: Jameson Thies <jthies@google.com>
Change-Id: Ifafa6e9ee7d9a62ef75e5c9e96606ffba64c98b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3602226
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Jameson Thies <jthies@google.com>
Tested-by: Jameson Thies <jthies@google.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/fake_usbc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/fake_usbc.c b/test/fake_usbc.c index c1a48ad4d5..6e61a1ca81 100644 --- a/test/fake_usbc.c +++ b/test/fake_usbc.c @@ -314,6 +314,11 @@ int dpm_get_source_pdo(const uint32_t **src_pdo, const int port) return pd_src_pdo_cnt; } +int dpm_get_status_msg(int port, uint8_t *msg, uint32_t *len) +{ + return EC_SUCCESS; +} + static enum tcpc_rp_value lcl_rp; __overridable void typec_select_src_current_limit_rp(int port, enum tcpc_rp_value rp) |