From c6e25ed020f100691991f879d21cfc8190d75fb5 Mon Sep 17 00:00:00 2001 From: Rakesh Bodla Date: Thu, 21 Nov 2013 18:12:14 +0530 Subject: 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 Reviewed-on: http://git-master/r/334358 GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty Reviewed-on: http://git-master/r/356814 Reviewed-by: Manish Tuteja Tested-by: Manish Tuteja --- arch/arm/mach-tegra/board-roth-power.c | 2 ++ arch/arm/mach-tegra/usb_phy.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 @@ -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); -- cgit v1.2.3