From: Sergii Postulga <x0153364@xxxxxx> Charger detection is given 500ms to complete until which it loops continuously taking all the processor time. If we plug USB-micro cable to board during playing video or audio we have a glitches. This patch frees time for doing other things during waiting the charger detecting flag. Signed-off-by: Sergii Postulga <x0153364@xxxxxx> Signed-off-by: Kishon Vijay Abraham I <kishon@xxxxxx> --- arch/arm/mach-omap2/omap_phy_internal.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c index 55918ea..2334de8 100644 --- a/arch/arm/mach-omap2/omap_phy_internal.c +++ b/arch/arm/mach-omap2/omap_phy_internal.c @@ -135,6 +135,7 @@ int omap4_charger_detect(void) chargertype = ((usb2phycore >> 21) & 0x7); if (usb2phycore & USB2PHY_CHGDETECTED) break; + msleep_interruptible(10); } while (!time_after(jiffies, timeout)); switch (chargertype) { -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html