summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-01-13 10:31:01 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-14 03:16:36 +0000
commit35da2b2c4b2f1c4b29afc39c27406d421840f46f (patch)
tree80fd035d3892755cefee5e8d47d8c053d9de8051
parent04de0d4c61a352de05a4f8b9980b479cc8e636f0 (diff)
downloadchrome-ec-35da2b2c4b2f1c4b29afc39c27406d421840f46f.tar.gz
firefly: fix bug causing disconnect event when requesting too fast
Fix bug causing firefly to disconnect when changing voltage request too fast. BUG=chrome-os-partner:35330 BRANCH=samus TEST=test with firefly and zinger. Change-Id: I6efb2f6fdd1ff64cee2cc722a538164cca946380 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/240460 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--common/usb_pd_protocol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index 72094f9912..b6bf8830df 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -2882,7 +2882,8 @@ void pd_request_source_voltage(int port, int mv)
{
pd_set_max_voltage(mv);
- if (pd[port].task_state == PD_STATE_SNK_READY) {
+ if (pd[port].task_state == PD_STATE_SNK_READY ||
+ pd[port].task_state == PD_STATE_SNK_TRANSITION) {
/* Set flag to send new power request in pd_task */
pd[port].new_power_request = 1;
} else {