diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2016-02-16 18:30:23 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-02-23 14:44:20 -0800 |
commit | 237406c5b12ed9934fc6eab7d24f30ba6e70fdce (patch) | |
tree | 3476e64514923c7f5bc793a96bbfdc3d0f88a1e0 /common | |
parent | 024a2447e9cc3897f567ef222e5613115cd0d720 (diff) | |
download | chrome-ec-237406c5b12ed9934fc6eab7d24f30ba6e70fdce.tar.gz |
pd: Don't source VBUS when forcing sink rolestabilize-7956.B
When forcing a sink role (eg. on transition from S3->S5), make sure
we're not sourcing VBUS. Otherwise, if a power source is attached, we
will fail to charge from it, due to the inability to sink and source
VBUS simultaneously.
BUG=chrome-os-partner:49544 chrome-os-partner:50343
TEST=Boot chell, attach USB-C peripheral, then power down chell. Remove
USB-C peripheral, attach zinger, and verify PD negotiation + charging
succeeds.
BRANCH=glados
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: I5fb9b0eb26e61daa93a167d6a3e9aaf4e4eeed39
Reviewed-on: https://chromium-review.googlesource.com/327727
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Divagar Mohandass <divagar.mohandass@intel.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/usb_pd_protocol.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index ccd55a8078..50b629c055 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -1241,6 +1241,8 @@ void pd_set_dual_role(enum pd_dual_role_states state) pd[i].power_role = PD_ROLE_SINK; set_state(i, PD_STATE_SNK_DISCONNECTED); tcpm_set_cc(i, TYPEC_CC_RD); + /* Make sure we're not sourcing VBUS. */ + pd_power_supply_reset(i); task_wake(PD_PORT_TO_TASK_ID(i)); } |