diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-01-09 11:00:47 -0800 |
---|---|---|
committer | Alec Berg <alecaberg@chromium.org> | 2015-01-10 23:43:43 +0000 |
commit | 8fbb6e8070bbe4dacbca44f48c49fe548a5c3e39 (patch) | |
tree | 6d3d5cba0fa980aba6be8ae1be246e93941210aa /include/usb_pd.h | |
parent | d83bd6b892e696c13f3584b5d3e1e0f51aafe710 (diff) | |
download | chrome-ec-8fbb6e8070bbe4dacbca44f48c49fe548a5c3e39.tar.gz |
pd: fix possible redundant requests (again)
Another fix for redundant requests. This time there can be
redundant requests if the maximum allowed voltage changes,
but we still fall into the samus PDO index and therefore are
asking for the same voltage. This fixes by checking the voltage
value we actually request vs. the max value we can request.
BUG=none
BRANCH=samus
TEST=samus to samus was causing redundant requests and now it's
not.
Change-Id: Ie49add1a42b86de97cee87f9d4637dd0578e2ce3
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/239950
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r-- | include/usb_pd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h index 67c049dcf0..a84736cdae 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -76,6 +76,7 @@ enum pd_errors { /* RDO : Request Data Object */ #define RDO_OBJ_POS(n) (((n) & 0x7) << 28) +#define RDO_POS(rdo) (((rdo) >> 28) & 0x7) #define RDO_GIVE_BACK (1 << 27) #define RDO_CAP_MISMATCH (1 << 26) #define RDO_COMM_CAP (1 << 25) |