tegra: whistler: Instantiate whistler touchscreen
Tom Cherry [Wed, 15 Dec 2010 22:13:09 +0000 (14:13 -0800)]
Original-Change-Id: Iba95aec378acaadf1b725affa5ceb5ce868b5358
Reviewed-on: http://git-master/r/13364
Tested-by: Thomas Cherry <tcherry@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

Rebase-Id: Raaa779b2e3b8f31319d7271f9409f892456e4362

arch/arm/mach-tegra/board-whistler.c

index 83c360b..f1acf24 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/clk.h>
 #include <linux/serial_8250.h>
 #include <linux/i2c.h>
-#include <linux/i2c/panjit_ts.h>
+#include <linux/synaptics_i2c_rmi.h>
 #include <linux/dma-mapping.h>
 #include <linux/delay.h>
 #include <linux/i2c-tegra.h>
@@ -446,6 +446,26 @@ static struct platform_device *whistler_devices[] __initdata = {
        &whistler_audio_device2,
 };
 
+static struct synaptics_i2c_rmi_platform_data synaptics_pdata = {
+       .flags          = SYNAPTICS_FLIP_X | SYNAPTICS_FLIP_Y | SYNAPTICS_SWAP_XY,
+       .irqflags       = IRQF_TRIGGER_LOW,
+};
+
+static const struct i2c_board_info whistler_i2c_touch_info[] = {
+       {
+               I2C_BOARD_INFO("synaptics-rmi-ts", 0x20),
+               .irq            = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PC6),
+               .platform_data  = &synaptics_pdata,
+       },
+};
+
+static int __init whistler_touch_init(void)
+{
+       i2c_register_board_info(0, whistler_i2c_touch_info, 1);
+
+       return 0;
+}
+
 static int __init whistler_scroll_init(void)
 {
        int i;
@@ -526,6 +546,7 @@ static void __init tegra_whistler_init(void)
        whistler_regulator_init();
        whistler_panel_init();
        whistler_sensors_init();
+       whistler_touch_init();
        whistler_kbc_init();
        whistler_bt_rfkill();
        whistler_gps_init();