aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHema HK <hemahk@ti.com>2011-04-15 09:33:01 +0100
committerAndy Green <andy.green@linaro.org>2011-04-15 09:33:01 +0100
commit340952646f8e5f6c8e11ff14d876f8301dc84b7f (patch)
tree4c524dcaf398a95fcf56aca89018f20eb98e7946
parent314e3a60176b5463608de3900b9e4ca5c6b2165a (diff)
From c6d8efb497252ee00f7a4ce1902021e669242d99 Mon Sep 17 00:00:00 2001
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 a6d3f2ffe81..7634c55281b 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;
}
@@ -1837,6 +1836,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");