summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-seaboard.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-03-16 16:08:29 -0600
committerStephen Warren <swarren@nvidia.com>2012-04-18 10:26:37 -0600
commit4bee6417c9444ca62e67956dcbcf25fe20feb869 (patch)
treeedc3da3e40b78d7363e93344a3afc5bf3d5b2db2 /arch/arm/mach-tegra/board-seaboard.c
parent434103adea3f63f6550f4b2bd16653328f933a66 (diff)
ARM: tegra: Remove VBUS_GPIO handling from board files
Instead of having board files manually request and initialize USB VBUS GPIOs, fill in the USB driver's platform data and have it do it. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/board-seaboard.c')
-rw-r--r--arch/arm/mach-tegra/board-seaboard.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
index d669847f0485..6fa8c3d0f76e 100644
--- a/arch/arm/mach-tegra/board-seaboard.c
+++ b/arch/arm/mach-tegra/board-seaboard.c
@@ -24,6 +24,7 @@
#include <linux/io.h>
#include <linux/gpio.h>
#include <linux/gpio_keys.h>
+#include <linux/platform_data/tegra_usb.h>
#include <sound/wm8903.h>
@@ -186,20 +187,10 @@ static struct i2c_board_info __initdata wm8903_device = {
static int seaboard_ehci_init(void)
{
- int gpio_status;
+ struct tegra_ehci_platform_data *pdata;
- gpio_status = gpio_request(TEGRA_GPIO_USB1, "VBUS_USB1");
- if (gpio_status < 0) {
- pr_err("VBUS_USB1 request GPIO FAILED\n");
- WARN_ON(1);
- }
-
- gpio_status = gpio_direction_output(TEGRA_GPIO_USB1, 1);
- if (gpio_status < 0) {
- pr_err("VBUS_USB1 request GPIO DIRECTION FAILED\n");
- WARN_ON(1);
- }
- gpio_set_value(TEGRA_GPIO_USB1, 1);
+ pdata = tegra_ehci1_device.dev.platform_data;
+ pdata->vbus_gpio = TEGRA_GPIO_USB1;
platform_device_register(&tegra_ehci1_device);
platform_device_register(&tegra_ehci3_device);