summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHema HK <hemahk@ti.com>2011-04-13 11:31:57 +0100
committerAndy Green <andy.green@linaro.org>2011-04-13 11:31:57 +0100
commit6491e8427776998ffdc8a4c56fea3a725004c15d (patch)
treef899bcdcaee8ecc492628821b774c4926d0f24f0
parent26ff925f44c72d44ba4256612a9a69537eb5e69c (diff)
Subject: [PATCH 3/3] usb: musb: Moving the Vbus enable function call from to workqueue.
Enable VBUS function can involve the I2C transfers which can't be called from interrupt context. Moving the function call to work queqe. Signed-off-by: Hema HK <hemahk@ti.com>
-rw-r--r--drivers/usb/musb/musb_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 7d0fea33fa6..c2915133291 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -555,7 +555,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
musb->ep0_stage = MUSB_EP0_START;
musb->xceiv->state = OTG_STATE_A_IDLE;
MUSB_HST_MODE(musb);
- musb_platform_set_vbus(musb, 1);
handled = IRQ_HANDLED;
}
@@ -1845,6 +1844,9 @@ static void musb_irq_work(struct work_struct *data)
struct musb *musb = container_of(data, struct musb, irq_work);
static int old_state;
+ if(musb->xceiv->state = OTG_STATE_A_IDLE)
+ musb_platform_set_vbus(musb, 1);
+
if (musb->xceiv->state != old_state) {
old_state = musb->xceiv->state;
sysfs_notify(&musb->controller->kobj, NULL, "mode");