From f2ea8d729d914599e53bab27f6e83cb88ff69984 Mon Sep 17 00:00:00 2001 From: Shawn Nematbakhsh Date: Wed, 13 Apr 2016 13:33:28 -0700 Subject: [PATCH] kevin: Don't disable both charge ports when we source VBUS Ensure we're not charging from the port we're sourcing, but don't touch the other port. BUG=chrome-os-partner:52315 BRANCH=None TEST=Attach unpowered peripheral + zinger to kevin and go to S0. Verify that we continue pulling current from zinger at 3A. Change-Id: Ic22b10e9ae08459cf062d7a51c9d627832d9ed63 Signed-off-by: Shawn Nematbakhsh Reviewed-on: https://chromium-review.googlesource.com/338833 Commit-Ready: Shawn N Tested-by: Shawn N Reviewed-by: Vincent Palatin --- board/kevin/usb_pd_policy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/board/kevin/usb_pd_policy.c b/board/kevin/usb_pd_policy.c index 0afe188de9..23c8645f84 100644 --- a/board/kevin/usb_pd_policy.c +++ b/board/kevin/usb_pd_policy.c @@ -50,8 +50,9 @@ void pd_transition_voltage(int idx) int pd_set_power_supply_ready(int port) { - /* Disable charging */ - bd99955_select_input_port(BD99955_CHARGE_PORT_NONE); + /* Ensure we're not charging from this port */ + if (charge_manager_get_active_charge_port() == port) + bd99955_select_input_port(BD99955_CHARGE_PORT_NONE); /* Provide VBUS */ gpio_set_level(port ? GPIO_C1_VOUT_EN_L :