diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-10-13 14:12:42 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-10-13 18:44:02 -0700 |
commit | e0df5cbaf04d086ad906ef8fc19e31ba2a977590 (patch) | |
tree | fa4d3cd13c1fc0fe5b9fdcaa81ba949604d72467 | |
parent | 89067fc458d8533a74e45a1285091dda7a96669e (diff) | |
download | chrome-ec-e0df5cbaf04d086ad906ef8fc19e31ba2a977590.tar.gz |
pd: allow request message over max current if mismatch bit set
Allow a request message over our max current if the mismatch bit
is set as per the PD spec.
BUG=chromium:542832
BRANCH=samus,ryu
TEST=load onto samus and connect to a ryu that is requesting 1A
max with mismatch bit set, and verify that we accept the request
Change-Id: I486495422c972a43927bb2ebffc64c2b9f9ac445
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/305375
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
-rw-r--r-- | common/usb_pd_policy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/usb_pd_policy.c b/common/usb_pd_policy.c index e20605f9ff..5cca1075ea 100644 --- a/common/usb_pd_policy.c +++ b/common/usb_pd_policy.c @@ -49,7 +49,7 @@ int pd_check_requested_voltage(uint32_t rdo) pdo_ma = (pdo & 0x3ff); if (op_ma > pdo_ma) return EC_ERROR_INVAL; /* too much op current */ - if (max_ma > pdo_ma) + if (max_ma > pdo_ma && !(rdo & RDO_CAP_MISMATCH)) return EC_ERROR_INVAL; /* too much max current */ CPRINTF("Requested %d V %d mA (for %d/%d mA)\n", |