usb: otg: tegra: Enable id interrupts in resume
Rakesh Bodla [Thu, 14 Mar 2013 09:31:29 +0000 (14:31 +0530)]
Enable id interrupts in otg resume for boards which
support pmu vbus detection. Also removing the mutex
lock from interrupt context.

Bug 1245272

Change-Id: I9e0790909d9cff8c577ce5040776a44b2f03cb23
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/209517
Reviewed-by: Riham Haidar <rhaidar@nvidia.com>
Tested-by: Riham Haidar <rhaidar@nvidia.com>

drivers/usb/otg/tegra-otg.c

index 1fb863e..d40c583 100644 (file)
@@ -94,10 +94,7 @@ static int otg_notifications(struct notifier_block *nb,
        DBG("%s(%d) tegra->int_status = 0x%lx\n", __func__,
                                __LINE__, tegra->int_status);
 
-       mutex_lock(&tegra->irq_work_mutex);
        schedule_work(&tegra->work);
-       mutex_unlock(&tegra->irq_work_mutex);
-
        DBG("%s(%d) End\n", __func__, __LINE__);
        return NOTIFY_DONE;
 }
@@ -624,6 +621,7 @@ static void tegra_otg_resume(struct device *dev)
 
        if (tegra->support_pmu_vbus) {
                mutex_unlock(&tegra->irq_work_mutex);
+               tegra->int_status = enable_interrupt(tegra, true);
                otg_notifications(NULL, 0, NULL);
                tegra->suspended = false;
                return ;