diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2015-01-15 09:47:02 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-21 06:44:33 +0000 |
commit | b13063c247a39603bf63f89e4442434a58cde236 (patch) | |
tree | 2466cd340fdce607c6d7100d90c5128742aed893 /include | |
parent | 3075113c856dc0c26325a7e5ff9d8ed7f9658b4d (diff) | |
download | chrome-ec-b13063c247a39603bf63f89e4442434a58cde236.tar.gz |
pd: retrieve logs from accessories
Send the VDO_CMD_GET_LOG VDM to accessories to get their PD event log
and append it to the PD MCU log.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=samus
BUG=chrome-os-partner:33248 chrome-os-partner:32785
TEST=ectool --name=cros_pd pdlog
Change-Id: Ib52d1e2cae5f77dcec6d0489eaa49527388b02b6
Reviewed-on: https://chromium-review.googlesource.com/242013
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_pd.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h index b6b8d9dbf1..2a473bb628 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -952,6 +952,23 @@ int pd_dev_store_rw_hash(int port, uint16_t dev_id, uint32_t *rw_hash, uint32_t ec_current_image); /** + * Try to fetch one PD log entry from accessory + * + * @param port USB-C accessory port number + * @return EC_RES_SUCCESS if the VDM was sent properly else error code + */ +int pd_fetch_acc_log_entry(int port); + +/** + * Analyze the log entry received as the VDO_CMD_GET_LOG payload. + * + * @param port USB-C accessory port number + * @param cnt number of data objects in payload + * @param payload payload data + */ +void pd_log_recv_vdm(int port, int cnt, uint32_t *payload); + +/** * Send Vendor Defined Message * * @param port USB-C port number |