From d67335420134fa5c097963b75058e650d9922606 Mon Sep 17 00:00:00 2001 From: Bharat Nihalani Date: Thu, 22 Sep 2011 20:24:19 +0530 Subject: ARM: tegra: ventana: Enable panjit touch-screen Change-Id: I5e66e920d2132a9bcc101f14026a6b686b59a002 Reviewed-on: http://git-master/r/54052 Reviewed-by: Varun Colbert Tested-by: Varun Colbert Rebase-Id: Rdbf71e85a3242a95c74b64976ce41593b9835fe0 --- arch/arm/mach-tegra/board-ventana.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'arch/arm/mach-tegra/board-ventana.c') diff --git a/arch/arm/mach-tegra/board-ventana.c b/arch/arm/mach-tegra/board-ventana.c index 55a354284b01..e730d4e2f7a5 100644 --- a/arch/arm/mach-tegra/board-ventana.c +++ b/arch/arm/mach-tegra/board-ventana.c @@ -428,6 +428,28 @@ static int __init ventana_touch_init_atmel(void) return 0; } +static struct panjit_i2c_ts_platform_data panjit_data = { + .gpio_reset = TEGRA_GPIO_PQ7, +}; + +static struct i2c_board_info __initdata ventana_i2c_bus1_touch_info[] = { + { + I2C_BOARD_INFO("panjit_touch", 0x3), + .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PV6), + .platform_data = &panjit_data, + }, +}; + +static int __init ventana_touch_init_panjit(void) +{ + tegra_gpio_enable(TEGRA_GPIO_PV6); + + tegra_gpio_enable(TEGRA_GPIO_PQ7); + i2c_register_board_info(0, ventana_i2c_bus1_touch_info, 1); + + return 0; +} + static struct usb_phy_plat_data tegra_usb_phy_pdata[] = { [0] = { .instance = 0, @@ -577,6 +599,7 @@ static void __init tegra_ventana_init(void) ventana_touch_init_atmel(); } else { pr_info("Initializing Panjit touch driver\n"); + ventana_touch_init_panjit(); } #ifdef CONFIG_KEYBOARD_GPIO -- cgit v1.2.3