summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin K Wong <kevin.k.wong@intel.com>2016-11-03 18:46:19 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-11-04 18:31:49 -0700
commit72d72ea0089ab27fadc7b9bf81829c1646e20847 (patch)
treecd095003900f669b7fd716525d3c9d96cd67da01
parent3405c79584d3ef2df734814443a0550c10375298 (diff)
downloadchrome-ec-72d72ea0089ab27fadc7b9bf81829c1646e20847.tar.gz
host_command_pd: reduce to 5msec delay in between PD interrupt handling
Since PD task are highest priority, the 50msec delay between was intended allow other tasks to execute if PD has continuous interrupt. With two separate TCPC handled by host_command_pd task, interrupt from one TCPC will block the interrupt handling of another TCPC by this 50msec and cause error in the PD negotiation. Reduced to 5msec to ensure TCPC interrupt is handled as soon as possible while allow other tasks to execute if needed. BUG=chrome-os-partner:59061 BRANCH=none TEST=Verify zinger can negotiate to 20V, hoho can get display. Also tested with faking PD interrupt always asserted to check for watchdog reset. Change-Id: I9b71277a3d65923f1f5bbfd744b3399e34fd0e6c Signed-off-by: Kevin K Wong <kevin.k.wong@intel.com> Reviewed-on: https://chromium-review.googlesource.com/407542 Tested-by: Divya S Sasidharan <divya.s.sasidharan@intel.com> Reviewed-by: Scott Collyer <scollyer@chromium.org>
-rw-r--r--common/host_command_pd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/host_command_pd.c b/common/host_command_pd.c
index fbfad43918..c3fc385216 100644
--- a/common/host_command_pd.c
+++ b/common/host_command_pd.c
@@ -198,7 +198,8 @@ static void pd_exchange_status(uint32_t ec_state)
#endif
if (!first_exchange)
- usleep(50*MSEC);
+ /* Delay to prevent task starvation */
+ usleep(5*MSEC);
first_exchange = 0;
} while (pd_get_alert());
#endif /* USB_TCPM_WITH_OFF_CHIP_TCPC */