summaryrefslogtreecommitdiff
path: root/include/usb_pd.h
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2016-10-25 14:53:49 +0200
committerchrome-bot <chrome-bot@chromium.org>2016-10-26 01:45:17 -0700
commitfffea303b4a0892a51d6dad5e903d7869deff13c (patch)
tree0470ea2c2b725e45bd466262164141fdaaf5253c /include/usb_pd.h
parent6e82ee47298583dd1ac3e37e5f73f93ee17a45d9 (diff)
downloadchrome-ec-fffea303b4a0892a51d6dad5e903d7869deff13c.tar.gz
pd: fix contract negotiation with dynamic PDOs
When the board is using dynamic source PDOs, we need to ensure that we are checking the incoming sink power request against the right set of PDOs else we might reject a valid request (e.g. with high-power source, we need to check against the 3.0A limit if we only have one port connected). Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=gru BUG=chrome-os-partner:56110 TEST=Connect Kevin to Caroline, ask Caroline to charge from the other side and see it negotiating successfully a 5V/3A contract. Change-Id: Ie1aa5746776be5946422bf07c08ae0f22faddd8c Reviewed-on: https://chromium-review.googlesource.com/403088 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r--include/usb_pd.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index 6ed339d94e..c588596e4c 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -919,9 +919,11 @@ int pd_check_requested_voltage(uint32_t rdo);
/**
* Run board specific checks on request message
*
+ * @param rdo the request data object word sent by the sink.
+ * @param pdo_cnt the total number of source PDOs.
* @return EC_SUCCESS if request is ok , <0 else.
*/
-int pd_board_check_request(uint32_t rdo);
+int pd_board_check_request(uint32_t rdo, int pdo_cnt);
/**
* Select a new output voltage.