diff options
author | Bharat Nihalani <bnihalani@nvidia.com> | 2011-09-22 20:24:19 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:01 -0800 |
commit | d67335420134fa5c097963b75058e650d9922606 (patch) | |
tree | 6253d55a20213bb2cb627f9fcbd40ce34deada11 /arch/arm/mach-tegra/board-ventana.c | |
parent | edd202e25c578a91a2167e8535230ef16ce8e984 (diff) |
ARM: tegra: ventana: Enable panjit touch-screen
Change-Id: I5e66e920d2132a9bcc101f14026a6b686b59a002
Reviewed-on: http://git-master/r/54052
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: Rdbf71e85a3242a95c74b64976ce41593b9835fe0
Diffstat (limited to 'arch/arm/mach-tegra/board-ventana.c')
-rw-r--r-- | arch/arm/mach-tegra/board-ventana.c | 23 |
1 files changed, 23 insertions, 0 deletions
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 |