summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRakesh Bodla <rbodla@nvidia.com>2013-11-21 18:12:14 +0530
committerManish Tuteja <mtuteja@nvidia.com>2014-01-16 17:19:51 -0800
commitc6e25ed020f100691991f879d21cfc8190d75fb5 (patch)
tree28070147ee03b32dd907b6c9e7138cdeafbba942
parent68c36762c7bec0376d594709bbe5df1a9dd469ba (diff)
ARM: tegra: add otg driver entry for usb_vbus and vbus_bat_chg
Add the otg driver under device list for usb_vbus and vbus_bat_chg regulators. If USB port has OTG support, allow the OTG driver to control the vbus. Bug 1375608 Change-Id: I86253d145a6ff966e7a4e50deee695efe8545b88 Signed-off-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-on: http://git-master/r/334358 GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> Reviewed-on: http://git-master/r/356814 Reviewed-by: Manish Tuteja <mtuteja@nvidia.com> Tested-by: Manish Tuteja <mtuteja@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/board-roth-power.c2
-rw-r--r--arch/arm/mach-tegra/usb_phy.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board-roth-power.c b/arch/arm/mach-tegra/board-roth-power.c
index 8aecc51800df..9c331dc33f54 100644
--- a/arch/arm/mach-tegra/board-roth-power.c
+++ b/arch/arm/mach-tegra/board-roth-power.c
@@ -100,10 +100,12 @@ static struct i2c_board_info __initdata tps51632_boardinfo[] = {
/* BQ2419X VBUS regulator */
static struct regulator_consumer_supply bq2419x_vbus_supply[] = {
REGULATOR_SUPPLY("usb_vbus", "tegra-ehci.0"),
+ REGULATOR_SUPPLY("usb_vbus", "tegra-otg"),
};
static struct regulator_consumer_supply bq2419x_batt_supply[] = {
REGULATOR_SUPPLY("usb_bat_chg", "tegra-udc.0"),
+ REGULATOR_SUPPLY("usb_bat_chg", "tegra-otg"),
};
static struct bq2419x_vbus_platform_data bq2419x_vbus_pdata = {
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
index 8de7f120a928..dd357bc9314e 100644
--- a/arch/arm/mach-tegra/usb_phy.c
+++ b/arch/arm/mach-tegra/usb_phy.c
@@ -2,7 +2,7 @@
* arch/arm/mach-tegra/usb_phy.c
*
* Copyright (C) 2010 Google, Inc.
- * Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved.
*
* Author:
* Erik Gilling <konkers@google.com>
@@ -100,6 +100,10 @@ struct tegra_usb_phy *get_tegra_phy(struct usb_phy *x)
static void usb_host_vbus_enable(struct tegra_usb_phy *phy, bool enable)
{
+ /* OTG driver will take care for OTG port */
+ if (phy->pdata->port_otg)
+ return;
+
if (phy->vbus_reg) {
if (enable)
regulator_enable(phy->vbus_reg);