summaryrefslogtreecommitdiff
path: root/baseboard
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 /baseboard
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 'baseboard')
-rw-r--r--baseboard/honeybuns/usb_pd_policy.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/baseboard/honeybuns/usb_pd_policy.c b/baseboard/honeybuns/usb_pd_policy.c
index a3b43d2402..f91f2e7076 100644
--- a/baseboard/honeybuns/usb_pd_policy.c
+++ b/baseboard/honeybuns/usb_pd_policy.c
@@ -122,7 +122,7 @@ void pd_transition_voltage(int idx)
int port = TASK_ID_TO_PD_PORT(task_get_current());
if (port == USB_PD_PORT_HOST) {
- int mv;
+ int mv, unused_mv;
int ma;
int vbus_hi;
int vbus_lo;
@@ -133,7 +133,8 @@ void pd_transition_voltage(int idx)
* by the PDO requested by sink. Note that USB PD uses idx = 1 for 1st
* PDO of SRC_CAP which must always be 5V fixed supply.
*/
- pd_extract_pdo_power(pd_src_host_pdo[idx - 1], &ma, &mv);
+ pd_extract_pdo_power(pd_src_host_pdo[idx - 1], &ma, &mv,
+ &unused_mv);
/* Set VBUS level to value specified in the requested PDO */
mp4245_set_voltage_out(mv);