summaryrefslogtreecommitdiff
path: root/test/usb_pd.c
diff options
context:
space:
mode:
authorScott <scollyer@chromium.org>2017-02-23 14:21:39 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-03-02 11:29:06 -0800
commita990e4e832010c6967eb0243de8ba7ce9c3a7825 (patch)
tree5aa714e85216cf8e684c001320b120d1b9a9bc0d /test/usb_pd.c
parentef6f6c5edfe8817d31ee32e5acb1e687d60f23fd (diff)
downloadchrome-ec-a990e4e832010c6967eb0243de8ba7ce9c3a7825.tar.gz
pd: Add tcpc_select_rp_value to stub tcpm driver
The function tcpm_select_rp_value() is used to set a given Rp value. This function was not supported for boards that use the config option CONFIG_USB_PD_TCPC. This CL adds a weak board_ function which can be overloaded for boards that have the requirement to set Rp to different values. BUG=chrome-os-partner:61878 BRANCH=servo TEST=run 'make buildall'. On plankton added a console command to trigger a call to tcpm_select_rp_value(0, 0), verified that it returned 2 (EC_ERROR_NOT_IMPLEMENTED). Then added board_select_rp_value() to plankton's board.c and verified that it returned 0. Change-Id: I1cd6f0ed51717736d30575c58025bd9a1c5d6fc4 Signed-off-by: Scott <scollyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/446685 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'test/usb_pd.c')
-rw-r--r--test/usb_pd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/usb_pd.c b/test/usb_pd.c
index d87a4c3960..80c5d10885 100644
--- a/test/usb_pd.c
+++ b/test/usb_pd.c
@@ -72,6 +72,11 @@ int pd_vdm(int port, int cnt, uint32_t *payload, uint32_t **rpayload)
return 0;
}
+int board_select_rp_value(int port, int rp)
+{
+ return 0;
+}
+
/* Tests */
void inc_tx_id(int port)