summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRakesh Bodla <rbodla@nvidia.com>2012-01-30 18:12:14 +0530
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-02-03 05:44:52 -0800
commitd13ca7821b47a12670612b35f7559d9942906626 (patch)
tree0472bf31b79ee8c0454d80de83aa2d6370e68b11
parenta88bd61cfd82fc8e49dd39f09534554a23742833 (diff)
tegra: usb: phy: set is_dpd true for device mode
If there is PMU interrupt for device mode set is_dpd to true. This will disable avdd_usb regulator. Bug 926694 Reviewed-on: http://git-master/r/78196 Change-Id: I7e0045ecb53f2fc984d567ff0e1331620f61be1d Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/78710 Reviewed-by: Automatic_Commit_Validation_User
-rw-r--r--arch/arm/mach-tegra/usb_phy.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
index f9bbf5fcac6d..69f1e0563926 100644
--- a/arch/arm/mach-tegra/usb_phy.c
+++ b/arch/arm/mach-tegra/usb_phy.c
@@ -2502,6 +2502,10 @@ int tegra_usb_phy_power_on(struct tegra_usb_phy *phy, bool is_dpd)
if (phy->power_on)
return ret;
+ if ((phy->instance == 0) && usb_phy_data[0].vbus_irq &&
+ (phy->mode == TEGRA_USB_PHY_MODE_DEVICE))
+ is_dpd = true;
+
if (phy->reg_vdd && !phy->regulator_on) {
regulator_enable(phy->reg_vdd);
phy->regulator_on = 1;
@@ -2526,6 +2530,10 @@ void tegra_usb_phy_power_off(struct tegra_usb_phy *phy, bool is_dpd)
if (!phy->power_on)
return;
+ if ((phy->instance == 0) && usb_phy_data[0].vbus_irq &&
+ (phy->mode == TEGRA_USB_PHY_MODE_DEVICE))
+ is_dpd = true;
+
if (power_off[phy->usb_phy_type])
power_off[phy->usb_phy_type](phy, is_dpd);