summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-tegra.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-05-09 23:43:04 -0700
committerOlof Johansson <olof@lixom.net>2012-05-09 23:43:04 -0700
commit7488185d0777ef84be7b365b08037fc7213010f6 (patch)
treec23a3db331693f783228c2f5afb38fed26ac1205 /drivers/usb/host/ehci-tegra.c
parentb664ae6ff92f7ba5c597d4f1b74d478d712c01c4 (diff)
parentaef7704c6cc36db9618603b22194def441d30432 (diff)
Merge branch 'for-3.5/gpio-pinmux' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/pinctrl
By Stephen Warren via Stephen Warren * 'for-3.5/gpio-pinmux' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: pinctrl: tegra: error reporting cleanup pinctrl: tegra: debugfs enhancements pinctrl: tegra: refactor probe handling ARM: dt: tegra20: add pinmux to device tree ARM: dt: tegra cardhu: add pinmux to device tree ARM: tegra: Remove pre-pinctrl pinmux driver ARM: tegra: Switch to new pinctrl driver gpio: tegra: Hide tegra_gpio_enable/disable() ARM: tegra: seaboard: Don't gpio_request() ISL29018_IRQ gpio: tegra: configure pins during irq_set_type ARM: tegra: Remove VBUS_GPIO handling from board files usb: ehci-tegra: Add vbus_gpio to platform data
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r--drivers/usb/host/ehci-tegra.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index 86183366647..826c2fd8c40 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -581,15 +581,16 @@ static const struct hc_driver tegra_ehci_hc_driver = {
.port_handed_over = ehci_port_handed_over,
};
-static int setup_vbus_gpio(struct platform_device *pdev)
+static int setup_vbus_gpio(struct platform_device *pdev,
+ struct tegra_ehci_platform_data *pdata)
{
int err = 0;
int gpio;
- if (!pdev->dev.of_node)
- return 0;
-
- gpio = of_get_named_gpio(pdev->dev.of_node, "nvidia,vbus-gpio", 0);
+ gpio = pdata->vbus_gpio;
+ if (!gpio_is_valid(gpio))
+ gpio = of_get_named_gpio(pdev->dev.of_node,
+ "nvidia,vbus-gpio", 0);
if (!gpio_is_valid(gpio))
return 0;
@@ -633,7 +634,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
if (!pdev->dev.dma_mask)
pdev->dev.dma_mask = &tegra_ehci_dma_mask;
- setup_vbus_gpio(pdev);
+ setup_vbus_gpio(pdev, pdata);
tegra = kzalloc(sizeof(struct tegra_ehci_hcd), GFP_KERNEL);
if (!tegra)