summaryrefslogtreecommitdiff
path: root/common/usb_pd_protocol.c
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2021-04-07 17:42:03 +0800
committerCommit Bot <commit-bot@chromium.org>2021-04-08 03:30:37 +0000
commitee5451a866ad69461ae08e9e7e9b0bf818621d34 (patch)
tree4b03e75e708f2f211511482d3601116168471242 /common/usb_pd_protocol.c
parent1370a872dd381369fb1d75113a43a147fd31105f (diff)
downloadchrome-ec-ee5451a866ad69461ae08e9e7e9b0bf818621d34.tar.gz
usb_common: support parse Augmented PDO
Change the function signature to void pd_extract_pdo_power(uint32_t pdo, uint32_t *ma, uint32_t *max_mv, uint32_t *min_mv); Replace the original caller with an extra unused parameter, no functional changes. BUG=none TEST=`pd 0 srccaps` prints the correct PDO info BRANCH=asurada Change-Id: I9b508e1a13737fe3ed61e6086416cff0c8ffb9a9 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2810660 Reviewed-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'common/usb_pd_protocol.c')
-rw-r--r--common/usb_pd_protocol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index ca28ed852a..1734be269d 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -1529,7 +1529,7 @@ static void pd_update_pdo_flags(int port, int pdo_cnt, uint32_t *pdos)
* - it presents at least 27 W of available power
*/
if (IS_ENABLED(CONFIG_CHARGE_MANAGER)) {
- uint32_t max_ma, max_mv, max_pdo, max_mw;
+ uint32_t max_ma, max_mv, max_pdo, max_mw, unused;
/*
* Get max power that the partner offers (not necessarily what
@@ -1537,7 +1537,7 @@ static void pd_update_pdo_flags(int port, int pdo_cnt, uint32_t *pdos)
*/
pd_find_pdo_index(pdo_cnt, pdos, PD_REV3_MAX_VOLTAGE,
&max_pdo);
- pd_extract_pdo_power(max_pdo, &max_ma, &max_mv);
+ pd_extract_pdo_power(max_pdo, &max_ma, &max_mv, &unused);
max_mw = max_ma * max_mv / 1000;
if (!(pdos[0] & PDO_FIXED_DUAL_ROLE) ||