From 3e25149b51b32abc99e7d93bac7f9edee756f508 Mon Sep 17 00:00:00 2001 From: "makarand.karvekar" Date: Mon, 30 Aug 2010 15:48:27 -0500 Subject: [PATCH] [ARM] tegra: updated touch interrupt line for Stingray P2 HW touch interrupt has moved from PV2 to PZ2 on P2 HW. Change-Id: Ic9375e1e081c3ac746f5fa2c21657bd1af1668a3 Signed-off-by: makarand.karvekar --- arch/arm/mach-tegra/board-stingray-touch.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-tegra/board-stingray-touch.c b/arch/arm/mach-tegra/board-stingray-touch.c index 49dec9f033ac..5a60f365168e 100644 --- a/arch/arm/mach-tegra/board-stingray-touch.c +++ b/arch/arm/mach-tegra/board-stingray-touch.c @@ -36,6 +36,8 @@ #define STINGRAY_TOUCH_INT_N_GPIO TEGRA_GPIO_PV2 #define STINGRAY_TOUCH_WAKE_N_GPIO TEGRA_GPIO_PJ2 +#define STINGRAY_TOUCH_INT_N_GPIO_P2 TEGRA_GPIO_PZ2 + static int stingray_touch_reset(void) { gpio_set_value(STINGRAY_TOUCH_RESET_N_GPIO, 0); @@ -588,15 +590,21 @@ struct qtouch_ts_platform_data stingray_touch_data_p1p2 = { static struct i2c_board_info __initdata stingray_i2c_bus1_touch_info[] = { { I2C_BOARD_INFO(QTOUCH_TS_NAME, 0x5B), - .irq = TEGRA_GPIO_TO_IRQ(STINGRAY_TOUCH_INT_N_GPIO), }, }; int __init stingray_touch_init(void) { - tegra_gpio_enable(STINGRAY_TOUCH_INT_N_GPIO); - gpio_request(STINGRAY_TOUCH_INT_N_GPIO, "touch_irq"); - gpio_direction_input(STINGRAY_TOUCH_INT_N_GPIO); + unsigned touch_int_gpio; + + if (stingray_revision() == STINGRAY_REVISION_P2) + touch_int_gpio = STINGRAY_TOUCH_INT_N_GPIO_P2; + else + touch_int_gpio = STINGRAY_TOUCH_INT_N_GPIO; + + tegra_gpio_enable(touch_int_gpio); + gpio_request(touch_int_gpio, "touch_irq"); + gpio_direction_input(touch_int_gpio); tegra_gpio_enable(STINGRAY_TOUCH_WAKE_N_GPIO); gpio_request(STINGRAY_TOUCH_WAKE_N_GPIO, "touch_wake"); @@ -606,6 +614,9 @@ int __init stingray_touch_init(void) gpio_request(STINGRAY_TOUCH_RESET_N_GPIO, "touch_reset"); gpio_direction_output(STINGRAY_TOUCH_RESET_N_GPIO, 1); + stingray_i2c_bus1_touch_info[0].irq = + TEGRA_GPIO_TO_IRQ(touch_int_gpio); + if ((stingray_revision() == STINGRAY_REVISION_P1) || (stingray_revision() == STINGRAY_REVISION_P2)) stingray_i2c_bus1_touch_info[0].platform_data = &stingray_touch_data_p1p2; -- 2.34.1