Redridge touchscreen support
authorSathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
Mon, 13 Feb 2012 19:49:10 +0000 (11:49 -0800)
committerbuildbot <buildbot@intel.com>
Tue, 14 Feb 2012 10:22:11 +0000 (02:22 -0800)
BZ: 22780

DV10 SFI device table is not supplying mxt1386 info. So initializing it
separately.We have to remove this hack once SFI tables are updated
properly.

Change-Id: I47e732d8b65f6dd3a0d0fa62ab6398450b6e3d0d
Signed-off-by: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>
Reviewed-on: http://android.intel.com:8080/35172
Reviewed-by: Yang, Fei <fei.yang@intel.com>
Reviewed-by: Wood, Brian J <brian.j.wood@intel.com>
Tested-by: Wood, Brian J <brian.j.wood@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
arch/x86/platform/intel-mid/board-redridge.c

index 2a0c55f..5187083 100644 (file)
@@ -1994,3 +1994,29 @@ static int __init blackbay_i2c_init(void)
        return 0;
 }
 device_initcall(blackbay_i2c_init);
+/*
+ * mxt1386 initialization routines for Redridge board
+ * (Should be removed once SFI tables are updated)
+ */
+static struct mxt_platform_data mxt1386_pdata = {
+       .numtouch       = 10,
+       .max_x          = 1023,
+       .max_y          = 975,
+       .orientation    = MXT_MSGB_T9_ORIENT_HORZ_FLIP,
+       .reset          = 129,
+       .irq            = 62,
+};
+static struct i2c_board_info dv10_i2c_bus0_devs[] = {
+       {
+               .type       = "mxt1386",
+               .addr       = 0x4C,
+               .platform_data = &mxt1386_pdata,
+       },
+};
+static int __init redridge_i2c_init(void)
+{
+       i2c_register_board_info(0, dv10_i2c_bus0_devs,
+                               ARRAY_SIZE(dv10_i2c_bus0_devs));
+       return 0;
+}
+device_initcall(redridge_i2c_init);