diff options
author | Jeremy Bettis <jbettis@google.com> | 2021-04-06 12:51:02 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-12 20:14:02 +0000 |
commit | d7917d3f795e99c9173c36ebe7af7295eb53571d (patch) | |
tree | b5db5a5333830c20534b412d5e4362cd4c5ca0cc /include/usb_common.h | |
parent | 8ef4ad9400e9ae4e56e832f8bb9cef232bc9a1fe (diff) | |
download | chrome-ec-d7917d3f795e99c9173c36ebe7af7295eb53571d.tar.gz |
ec: Parse battery and augmented PDOs correctly.
Fixes pd_extract_pdo_power() to output the correct voltage and current
for non-fixed PDOs. Add unit test.
BRANCH=none
BUG=b:178484932
TEST=added
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I6de55be3c753e01ef26424896c6fd41b8df8f94b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2805226
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include/usb_common.h')
-rw-r--r-- | include/usb_common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/usb_common.h b/include/usb_common.h index 57c2e1d870..fc385eacf8 100644 --- a/include/usb_common.h +++ b/include/usb_common.h @@ -134,8 +134,8 @@ 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, or max_mv of the Augmented PDO (output) - * @param mv voltage of the PDO, or min_mv of the Augmented PDO (output) + * @param max_mv maximum voltage of the PDO (output) + * @param min_mv minimum voltage of the PDO (output) */ void pd_extract_pdo_power(uint32_t pdo, uint32_t *ma, uint32_t *max_mv, uint32_t *min_mv); |