diff options
author | Eric Yilun Lin <yllin@chromium.org> | 2021-04-07 17:42:03 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-08 03:30:37 +0000 |
commit | ee5451a866ad69461ae08e9e7e9b0bf818621d34 (patch) | |
tree | 4b03e75e708f2f211511482d3601116168471242 /include/usb_common.h | |
parent | 1370a872dd381369fb1d75113a43a147fd31105f (diff) | |
download | chrome-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 'include/usb_common.h')
-rw-r--r-- | include/usb_common.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/usb_common.h b/include/usb_common.h index 00440390df..91418937df 100644 --- a/include/usb_common.h +++ b/include/usb_common.h @@ -134,9 +134,11 @@ int pd_find_pdo_index(uint32_t src_cap_cnt, const uint32_t * const src_caps, * * @param pdo raw pdo to extract * @param ma current of the PDO (output) - * @param mv voltage of the PDO (output) + * @param mv voltage of the PDO, or max_mv of the Augmented PDO (output) + * @param mv voltage of the PDO, or min_mv of the Augmented PDO (output) */ -void pd_extract_pdo_power(uint32_t pdo, uint32_t *ma, uint32_t *mv); +void pd_extract_pdo_power(uint32_t pdo, uint32_t *ma, uint32_t *max_mv, + uint32_t *min_mv); /** * Decide which PDO to choose from the source capabilities. |