From c6ef8e08914428e5c6d12fd69c1a9589e5839c14 Mon Sep 17 00:00:00 2001 From: Andy Carman Date: Wed, 7 Mar 2012 10:55:18 +0530 Subject: usb: otg: tegra: change logic for enable clock When there is PMU interrupt we need to enable controller clock. For this currently, work is being schedule, removing this as clock can be enabled directly without scheduling any work. bug 925958 bug 941899 Signed-off-by: Andy Carman Signed-off-by: Krishna Yarlagadda Reviewed-on: http://git-master/r/88777 (cherry picked from commit fc31c04b7124f30970e862dd1b21a97d18dca38e) Change-Id: I8f6e7325771219488440226ddde97a32da228608 Reviewed-on: http://git-master/r/97882 Reviewed-by: Simone Willett Tested-by: Simone Willett --- drivers/usb/otg/tegra-otg.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/usb/otg/tegra-otg.c b/drivers/usb/otg/tegra-otg.c index ecb88acf8d24..68d402afb25e 100644 --- a/drivers/usb/otg/tegra-otg.c +++ b/drivers/usb/otg/tegra-otg.c @@ -62,7 +62,6 @@ struct tegra_otg_data { struct platform_device *pdev; struct work_struct work; unsigned int intr_reg_data; - bool detect_vbus; bool clk_enabled; callback_t charger_cb; void *charger_cb_data; @@ -257,12 +256,6 @@ static void irq_work(struct work_struct *work) unsigned long flags; unsigned long status; - if (tegra->detect_vbus) { - tegra->detect_vbus = false; - tegra_otg_enable_clk(); - return; - } - clk_enable(tegra->clk); spin_lock_irqsave(&tegra->lock, flags); @@ -307,7 +300,6 @@ static irqreturn_t tegra_otg_irq(int irq, void *data) otg_writel(tegra, val, USB_PHY_WAKEUP); if ((val & USB_ID_INT_STATUS) || (val & USB_VBUS_INT_STATUS)) { tegra->int_status = val; - tegra->detect_vbus = false; schedule_work(&tegra->work); } } @@ -319,8 +311,7 @@ static irqreturn_t tegra_otg_irq(int irq, void *data) void tegra_otg_check_vbus_detection(void) { - tegra_clone->detect_vbus = true; - schedule_work(&tegra_clone->work); + tegra_otg_enable_clk(); } EXPORT_SYMBOL(tegra_otg_check_vbus_detection); @@ -345,7 +336,6 @@ static int tegra_otg_set_peripheral(struct otg_transceiver *otg, if ((val & USB_ID_INT_STATUS) || (val & USB_VBUS_INT_STATUS)) { tegra->int_status = val; - tegra->detect_vbus = false; schedule_work (&tegra->work); } -- cgit v1.2.3