summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2014-07-08 10:23:46 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-07-08 23:26:08 +0000
commit1717d598b2e914af641b728365eecdf128150d9e (patch)
tree77e4c0c4b33e6f43fde44a0cf95695e65496c52a
parent51a55988a4820113755ac634eeceb5b2b750ed8a (diff)
downloadchrome-ec-1717d598b2e914af641b728365eecdf128150d9e.tar.gz
pd: ensure we always re-enable source power
When we reset the PD power source, ensure we always transition to DISCONNECTED state, so we will re-enable the 5V power when transitioning back from DISCONNECTED to DISCOVERY. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=none TEST=Plug Firefly to Zinger and play with voltage transition buttons. Change-Id: Ifa0f30391b2249b54385ce8c93df932e37803695 Reviewed-on: https://chromium-review.googlesource.com/206954 Reviewed-by: Alec Berg <alecaberg@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--common/usb_pd_protocol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index e0fdc186ba..228bc883ca 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -859,7 +859,7 @@ void pd_task(void)
} else {
/* The sink did not ack, cut the power... */
pd_power_supply_reset();
- pd_task_state = PD_STATE_SRC_DISCOVERY;
+ pd_task_state = PD_STATE_SRC_DISCONNECTED;
}
break;
case PD_STATE_SRC_READY:
@@ -868,7 +868,7 @@ void pd_task(void)
if (res < 0) {
/* The sink died ... */
pd_power_supply_reset();
- pd_task_state = PD_STATE_SRC_DISCOVERY;
+ pd_task_state = PD_STATE_SRC_DISCONNECTED;
timeout = PD_T_SEND_SOURCE_CAP;
} else { /* schedule next keep-alive */
timeout = PD_T_SOURCE_ACTIVITY;