From 4acbdffcc5bab2a94d3e16b7de21ee564c3366a4 Mon Sep 17 00:00:00 2001 From: jianqian Date: Tue, 5 Jun 2012 14:23:50 +0800 Subject: [PATCH] usb/host:Enter runtime_suspend without 500ms delay when otg state == A_HOST || otg state == A_WAIT_B_CON BZ: 36969 Enter runtime_suspend without delay in runtime_idle to prevent port change happens during 500ms delay. If during 500ms delay, devices like mouse connect to port, this event can not process for driver also enter runtime suspend. Change to submit to R3-Stable. Change-Id: I5286c0b69ca667a4a40052a273e014bfc3ad2fcb Signed-off-by: jianqian Reviewed-on: http://android.intel.com:8080/51382 Reviewed-by: Meng, Zhe Tested-by: Meng, Zhe Reviewed-by: Tang, Richard Reviewed-by: buildbot Tested-by: buildbot --- drivers/usb/otg/penwell_otg.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/otg/penwell_otg.c b/drivers/usb/otg/penwell_otg.c index 9ff5711..d179dad 100644 --- a/drivers/usb/otg/penwell_otg.c +++ b/drivers/usb/otg/penwell_otg.c @@ -4755,6 +4755,12 @@ static int penwell_otg_runtime_idle(struct device *dev) dev_dbg(dev, "Keep in active\n"); dev_dbg(dev, "%s <---\n", __func__); return -EBUSY; + case OTG_STATE_A_WAIT_BCON: + case OTG_STATE_A_HOST: + /* Schedule runtime_suspend without delay */ + pm_schedule_suspend(dev, 0); + dev_dbg(dev, "%s <---\n", __func__); + return -EBUSY; default: break; } -- 2.7.4