USB: OTG: Reduce ACA ID polling timer period
The current ACA ID timer period is 2 sec. If charger is plugged
in or removed, the UI update will take 2 sec in the worst case.
Reduce the current period from 2 sec to 500 msec for better
UI experience.
CRs-Fixed: 346923
Change-Id: I933b22aa8d4dc517eb5a5bf3fa25ba7ce693411c
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c
index 037f834..7aa0430 100644
--- a/drivers/usb/otg/msm_otg.c
+++ b/drivers/usb/otg/msm_otg.c
@@ -49,8 +49,7 @@
#define MSM_USB_BASE (motg->regs)
#define DRIVER_NAME "msm_otg"
-#define ID_TIMER_FREQ (jiffies + msecs_to_jiffies(2000))
-#define ID_TIMER_INITIAL_FREQ (jiffies + msecs_to_jiffies(1000))
+#define ID_TIMER_FREQ (jiffies + msecs_to_jiffies(500))
#define ULPI_IO_TIMEOUT_USEC (10 * 1000)
#define USB_PHY_3P3_VOL_MIN 3050000 /* uV */
#define USB_PHY_3P3_VOL_MAX 3300000 /* uV */
@@ -2292,7 +2291,7 @@
msm_otg_start_host(otg, 1);
msm_chg_enable_aca_det(motg);
msm_chg_disable_aca_intr(motg);
- mod_timer(&motg->id_timer, ID_TIMER_INITIAL_FREQ);
+ mod_timer(&motg->id_timer, ID_TIMER_FREQ);
if (msm_chg_check_aca_intr(motg))
work = 1;
}