input: touch: atmel_mxt_ts: Increase touch perf for SKU-2000.
Robert Collins [Mon, 15 Aug 2011 22:59:17 +0000 (15:59 -0700)]
Increase touchscreen performance for Cardhu SKU-2000 with touch
panel air gap gasket changes.

Bug 864735

Original-Change-Id: I01137e8d31230cd1d1f5a7d25d82259cc732b1e5
Reviewed-on: http://git-master/r/47197
Reviewed-by: Narendra Damahe <ndamahe@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Reviewed-by: Ali Ekici <aekici@nvidia.com>
Tested-by: Ali Ekici <aekici@nvidia.com>
Reviewed-by: Jonathan Mccaffrey <jmccaffrey@nvidia.com>
Tested-by: Jonathan Mccaffrey <jmccaffrey@nvidia.com>

Rebase-Id: Rede07c6cc06387a4ccb31eaa2b7bd2e4603c3768

arch/arm/mach-tegra/board-cardhu.c
arch/arm/mach-tegra/board-cardhu.h

index b22f1a8..ea8cab8 100644 (file)
@@ -478,6 +478,30 @@ static const u8 config[] = {
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
+#define MXT_CONFIG_CRC_SKU2000  0xA24D9A
+static const u8 config_sku2000[] = {
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0xFF, 0xFF, 0x32, 0x0A, 0x00, 0x14, 0x14, 0x19,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x8B, 0x00, 0x00,
+       0x1B, 0x2A, 0x00, 0x20, 0x3A, 0x04, 0x05, 0x00,  //23=thr  2 di
+       0x04, 0x04, 0x41, 0x0A, 0x0A, 0x0A, 0x0A, 0xFF,
+       0x02, 0x55, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,  //0A=limit
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23,
+       0x00, 0x00, 0x00, 0x05, 0x0A, 0x15, 0x1E, 0x00,
+       0x00, 0x04, 0x00, 0x03, 0x3F, 0x64, 0x64, 0x01,
+       0x0A, 0x14, 0x28, 0x4B, 0x00, 0x02, 0x00, 0x64,
+       0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x08, 0x10, 0x3C, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
 static struct mxt_platform_data atmel_mxt_info = {
        .x_line         = 27,
        .y_line         = 42,
@@ -505,6 +529,8 @@ static struct i2c_board_info __initdata atmel_i2c_info[] = {
 
 static int __init cardhu_touch_init(void)
 {
+       struct board_info BoardInfo;
+
        tegra_gpio_enable(TEGRA_GPIO_PH4);
        tegra_gpio_enable(TEGRA_GPIO_PH6);
 
@@ -517,6 +543,12 @@ static int __init cardhu_touch_init(void)
        gpio_set_value(TEGRA_GPIO_PH6, 1);
        msleep(100);
 
+       tegra_get_board_info(&BoardInfo);
+       if ((BoardInfo.sku & SKU_TOUCH_MASK) == SKU_TOUCH_2000) {
+               atmel_mxt_info.config = config_sku2000;
+               atmel_mxt_info.config_crc = MXT_CONFIG_CRC_SKU2000;
+       }
+
        i2c_register_board_info(1, atmel_i2c_info, 1);
 
        return 0;
index e11ebe6..bd52b2c 100644 (file)
@@ -41,6 +41,9 @@
 #define SKU_T30S_SUPPORT               0x4
 #define SKU_TOUCHSCREEN_MECH_FIX       0x10
 
+#define SKU_TOUCH_MASK                 0xFF00
+#define SKU_TOUCH_2000                 0x0B00
+
 #define SKU_MEMORY_TYPE_BIT            0x4
 #define SKU_MEMORY_TYPE_MASK           0x3
 #define SKU_MEMORY_SAMSUNG_EC          0x0