diff options
Diffstat (limited to 'arch/arm/mach-tegra/usb_phy.c')
-rw-r--r-- | arch/arm/mach-tegra/usb_phy.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index 376142a8a546..d7bc6180f94a 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c @@ -1041,6 +1041,10 @@ static void uhsic_phy_power_off(struct tegra_usb_phy *phy) } +#ifdef CONFIG_USB_TEGRA_OTG +extern void tegra_otg_check_vbus_detection(void); +#endif + static irqreturn_t usb_phy_vbus_irq_thr(int irq, void *pdata) { struct tegra_usb_phy *phy = pdata; @@ -1048,8 +1052,17 @@ static irqreturn_t usb_phy_vbus_irq_thr(int irq, void *pdata) if (!phy->regulator_on) { regulator_enable(phy->reg_vdd); phy->regulator_on = 1; + /* + * Optimal time to get the regulator turned on + * before detecting vbus interrupt. + */ + mdelay(15); } +#ifdef CONFIG_USB_TEGRA_OTG + tegra_otg_check_vbus_detection(); +#endif + return IRQ_HANDLED; } |