diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-11-02 17:55:11 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-11-06 20:06:25 +0000 |
commit | 8bd7ab6203b2e6a33a75be83ae178bde52720145 (patch) | |
tree | 60e2e70a7219208a54a10074ee2bebc442becad6 /common/charge_manager.c | |
parent | 75ced738383d4b3bdf4e95b31c193cb0366e69cf (diff) | |
download | chrome-ec-8bd7ab6203b2e6a33a75be83ae178bde52720145.tar.gz |
pd: update source/sink cap PDOs and use to get dual role capable
Update source and sink capacity tables for all PD boards. As
per spec, the first entry in both tables must be a fixed power
supply PDO. Added dual-role capable bit to fixed PDOs and added
new state variable to keep track of that information for each
port. This will be used to make decisions in charge manager and
to pass up via host commands.
BUG=chrome-os-partner:28869
BRANCH=samus
TEST=make buildall. use "pd 1 status" to check
if part partner is dual-role capable and check zinger is not,
C to A receptable adapter is not, and another samus is.
Change-Id: I49f034a372bc145cd524577c17ca210eec4c1013
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/227170
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'common/charge_manager.c')
-rw-r--r-- | common/charge_manager.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/charge_manager.c b/common/charge_manager.c index 3bea74747f..c884c05500 100644 --- a/common/charge_manager.c +++ b/common/charge_manager.c @@ -201,8 +201,8 @@ static int hc_pd_power_info(struct host_cmd_handler_args *args) else r->role = USB_PD_PORT_POWER_DISCONNECTED; - /* TODO: fill in appropriate dual-role status */ - r->dualrole = 0; + /* Is port partner dual-role capable */ + r->dualrole = pd_get_partner_dualrole_capable(port); if (sup == CHARGE_SUPPLIER_NONE) { r->type = USB_CHG_TYPE_NONE; |