From: Kishon Vijay Abraham I <kishon@ti.com>
To: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
balbi@ti.com, heikki.krogerus@linux.intel.com, gregkh@suse.de
Cc: p-basak2@ti.com, kishon@ti.com, balajitk@ti.com, x0153364@ti.com,
m-sonasath@ti.com, vishp@ti.com, hemahk@ti.com
Subject: [RFC PATCH 5/6] OMAP4: PHY internal: Add msleep_interruptible to charger detection function
Date: Thu, 15 Sep 2011 19:50:02 +0530 [thread overview]
Message-ID: <1316096403-6013-6-git-send-email-kishon@ti.com> (raw)
In-Reply-To: <1316096403-6013-1-git-send-email-kishon@ti.com>
From: Sergii Postulga <x0153364@ti.com>
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@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
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
prev parent reply other threads:[~2011-09-15 14:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 14:19 [RFC PATCH 0/6] usb: musb: charger detection Kishon Vijay Abraham I
2011-09-15 14:19 ` [RFC PATCH 1/6] usb: musb: omap: Configure OTG_INTERFSEL for proper " Kishon Vijay Abraham I
2011-09-16 9:48 ` Sergei Shtylyov
2011-09-16 13:51 ` ABRAHAM, KISHON VIJAY
[not found] ` <CAAe_U6KaFJGM61=Pkm2q-EBQeEtSAOBuC2jgFRd7DV4xKOjJdg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-16 14:13 ` Greg KH
2011-09-19 14:56 ` T Krishnamoorthy, Balaji
2011-09-19 17:12 ` Greg KH
[not found] ` <1316096403-6013-1-git-send-email-kishon-l0cyMroinI0@public.gmane.org>
2011-09-15 14:19 ` [RFC PATCH 2/6] usb: musb: omap4430_phy_power to enable/disable clocks and power up/down phy Kishon Vijay Abraham I
2011-09-15 14:20 ` [RFC PATCH 3/6] OMAP4: TWL6030: add USB charger detection Kishon Vijay Abraham I
2011-09-15 14:20 ` [RFC PATCH 4/6] MUSB Charger Type Detection: Fix DCP detect during boot Kishon Vijay Abraham I
2011-09-15 14:20 ` [RFC PATCH 6/6] twl6030: set charger current to be used by battery charging module Kishon Vijay Abraham I
2011-09-15 14:20 ` Kishon Vijay Abraham I [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1316096403-6013-6-git-send-email-kishon@ti.com \
--to=kishon@ti.com \
--cc=balajitk@ti.com \
--cc=balbi@ti.com \
--cc=gregkh@suse.de \
--cc=heikki.krogerus@linux.intel.com \
--cc=hemahk@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m-sonasath@ti.com \
--cc=p-basak2@ti.com \
--cc=vishp@ti.com \
--cc=x0153364@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox