From 5318836ea0e075611d0e8b2e497d56701d558b6a Mon Sep 17 00:00:00 2001 From: Gary King Date: Tue, 7 Sep 2010 16:04:05 -0700 Subject: [PATCH] [ARM] tegra: ventana: specify panjit reset GPIO also delete the function which resets the touchscreen controller, since that is now part of the panjit_touch driver _probe routine Change-Id: I172b726978fde44cd98da391d233e31ecd9f7da2 Signed-off-by: Gary King --- arch/arm/mach-tegra/board-ventana.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-tegra/board-ventana.c b/arch/arm/mach-tegra/board-ventana.c index 7afc197232da..0b2ec53aedfe 100644 --- a/arch/arm/mach-tegra/board-ventana.c +++ b/arch/arm/mach-tegra/board-ventana.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -183,14 +183,6 @@ static struct platform_device *ventana_devices[] __initdata = { &ventana_keys_device, }; -static void ventana_touch_reset(void) -{ - gpio_set_value(TEGRA_GPIO_PQ7, 1); - msleep(50); - gpio_set_value(TEGRA_GPIO_PQ7, 0); - msleep(50); -} - static void ventana_keys_init(void) { int i; @@ -199,10 +191,15 @@ static void ventana_keys_init(void) tegra_gpio_enable(ventana_keys[i].gpio); } +static struct panjit_i2c_ts_platform_data panjit_data = { + .gpio_reset = TEGRA_GPIO_PQ7, +}; + static const struct i2c_board_info ventana_i2c_bus1_touch_info[] = { { I2C_BOARD_INFO("panjit_touch", 0x3), - .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV6), + .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV6), + .platform_data = &panjit_data, }, }; @@ -211,10 +208,6 @@ static int __init ventana_touch_init(void) tegra_gpio_enable(TEGRA_GPIO_PV6); tegra_gpio_enable(TEGRA_GPIO_PQ7); - gpio_request(TEGRA_GPIO_PQ7, "touch_reset"); - gpio_direction_output(TEGRA_GPIO_PQ7, 1); - - ventana_touch_reset(); i2c_register_board_info(0, ventana_i2c_bus1_touch_info, 1); return 0; -- 2.34.1