#include <linux/extcon.h>
#include <linux/gpio.h>
#include <linux/regulator/consumer.h>
+#include <linux/usb/hcd.h>
#include <mach/pm_domains.h>
#include <mach/tegra_usb_pad_ctrl.h>
struct tegra_otg *tegra = data;
unsigned long flags;
unsigned long val;
+ struct usb_hcd *hcd = bus_to_hcd(tegra->phy.otg->host);
+ enum usb_otg_state state = tegra->phy.state;
spin_lock_irqsave(&tegra->lock, flags);
val = otg_readl(tegra, USB_PHY_WAKEUP);
schedule_work(&tegra->work);
}
}
+
+ /* Re-acquire wakelock to service the device connected */
+ /* Abort the suspend */
+
+ if (state == OTG_STATE_A_HOST) {
+ if (hcd && hcd->state == HC_STATE_SUSPENDED)
+ tegra_otg_notify_event(tegra, USB_EVENT_ID);
+ }
spin_unlock_irqrestore(&tegra->lock, flags);
return IRQ_HANDLED;