From 840facbb4e3c8b96c1e9c0566901db20a49c81c5 Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Wed, 26 Jun 2013 16:09:04 +0800 Subject: [PATCH] spring: Switch ID_MUX back on redetecting When we are redetecting, if ID_MUX is 1, we need to switch it back. Otherwise, no one is there to switch it and we are stuck in this state. BUG=None TEST=Check the EC detects device type after redetecting from device type 0x60400. BRANCH=Spring Original-Change-Id: I42378e2ea9177962524af7316d76c54b2518e614 Signed-off-by: Vic Yang Reviewed-on: https://gerrit.chromium.org/gerrit/60041 (cherry picked from commit 7ebc1b269360f54dde29e3ec75f44e1976a15992) Change-Id: I89ec974030712dea6157405a3b1bc819dc130e94 Signed-off-by: Vic Yang Reviewed-on: https://gerrit.chromium.org/gerrit/60623 Reviewed-by: Randall Spangler Reviewed-by: Vincent Palatin --- common/extpower_usb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/extpower_usb.c b/common/extpower_usb.c index c2d8dba72f..927f6374c8 100644 --- a/common/extpower_usb.c +++ b/common/extpower_usb.c @@ -894,6 +894,8 @@ static void usb_charger_redetect(void) pending_tsu6721_reset = 1; else pending_dev_type_update = 1; + if (gpio_get_level(GPIO_ID_MUX)) + restore_id_mux = 1; charger_need_redetect = REDETECTED; task_wake(TASK_ID_CHARGER); }