mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 01:50:53 +00:00
pd: add data role to pd message header
Added data role bit to PD message header. The data role is currently tied to power role: source = DFP, sink = UFP. BUG=none BRANCH=samus TEST=tested with third part protocol analyzer Change-Id: Ic56ea92899d20013aace108cee794d10c3780364 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/224178 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
959dcf9854
commit
5d76ffc62d
@@ -491,9 +491,11 @@ enum pd_data_msg_type {
|
||||
#define PD_ROLE_SOURCE 1
|
||||
|
||||
/* build message header */
|
||||
/* TODO(crosbug.com/p/28343): need to seperate data role from power role */
|
||||
#define PD_HEADER(type, role, id, cnt) \
|
||||
((type) | (PD_REV20 << 6) | \
|
||||
((role) << 8) | ((id) << 9) | ((cnt) << 12) | \
|
||||
((role) << 5) | ((role) << 8) | \
|
||||
((id) << 9) | ((cnt) << 12) | \
|
||||
PD_BMC_SUPPORTED)
|
||||
|
||||
#define PD_HEADER_CNT(header) (((header) >> 12) & 7)
|
||||
|
||||
Reference in New Issue
Block a user