summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-06-22 01:14:43 +0800
committerChromeBot <chrome-bot@google.com>2013-06-21 10:17:38 -0700
commit3c1b2b757546c022d0ae0eb22e3db9feb41055c4 (patch)
tree3d30a20675aef499d8041e6f0f17aa192ed6d0ed
parent088a65615df492adce57244db86af9f04eb93ca4 (diff)
downloadchrome-ec-3c1b2b757546c022d0ae0eb22e3db9feb41055c4.tar.gz
spring: Wait 80ms for CABLE_DET to be asserted
From our measurement, it takes ~80ms for CABLE_DET to be asserted. Let's wait for that long before giving up and declare it an USB host. BUG=chrome-os-partner:20405 TEST=Manual BRANCH=Spring Change-Id: I71568ed8011f9b3f2c9c2ee67aea3c771a5dbf37 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/59566
-rw-r--r--board/spring/usb_charging.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/spring/usb_charging.c b/board/spring/usb_charging.c
index 21624a2fcc..8c49064006 100644
--- a/board/spring/usb_charging.c
+++ b/board/spring/usb_charging.c
@@ -78,6 +78,7 @@
#define DELAY_POWER_MS 20
#define DELAY_USB_DP_DN_MS 20
#define DELAY_ID_MUX_MS 30
+#define DELAY_CABLE_DET_MS 80
static int current_dev_type = TSU6721_TYPE_NONE;
static int nominal_pwm_duty;
@@ -268,7 +269,7 @@ static int board_probe_video(int device_type)
{
tsu6721_disable_interrupts();
gpio_set_level(GPIO_ID_MUX, 1);
- msleep(DELAY_ID_MUX_MS);
+ msleep(DELAY_ID_MUX_MS + DELAY_CABLE_DET_MS);
if (adc_read_channel(ADC_CH_USB_DP_SNS) < VIDEO_ID_THRESHOLD) {
if (device_type & TSU6721_TYPE_VBUS_DEBOUNCED) {