Guest User

Untitled

a guest
Mar 27th, 2011
1,081
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/arch/arm/mach-s5pv210/mach-herring.c b/arch/arm/mach-s5pv210/mach-herring.c
  2. index 7593c7e..af74a5b 100755
  3. --- a/arch/arm/mach-s5pv210/mach-herring.c
  4. +++ b/arch/arm/mach-s5pv210/mach-herring.c
  5. @@ -2248,7 +2248,7 @@ static u8 t7_config[] = {GEN_POWERCONFIG_T7,
  6.  static u8 t8_config[] = {GEN_ACQUISITIONCONFIG_T8,
  7.                 7, 0, 5, 0, 0, 0, 9, 35};
  8.  static u8 t9_config[] = {TOUCH_MULTITOUCHSCREEN_T9,
  9. -               139, 0, 0, 19, 11, 0, 32, 25, 2, 1, 25, 3, 1,
  10. +               139, 0, 0, 19, 11, 0, 28, 36, 2, 1, 25, 3, 1,
  11.                 46, MXT224_MAX_MT_FINGERS, 5, 14, 10, 255, 3,
  12.                 255, 3, 18, 18, 10, 10, 141, 65, 143, 110, 18};
  13.  static u8 t18_config[] = {SPT_COMCONFIG_T18,
  14. @@ -2256,7 +2256,7 @@ static u8 t18_config[] = {SPT_COMCONFIG_T18,
  15.  static u8 t20_config[] = {PROCI_GRIPFACESUPPRESSION_T20,
  16.                 7, 0, 0, 0, 0, 0, 0, 80, 40, 4, 35, 10};
  17.  static u8 t22_config[] = {PROCG_NOISESUPPRESSION_T22,
  18. -               5, 0, 0, 0, 0, 0, 0, 3, 30, 0, 0, 29, 34, 39,
  19. +               5, 0, 0, 0, 0, 0, 0, 3, 20, 0, 0, 29, 34, 39,
  20.                 49, 58, 3};
  21.  static u8 t28_config[] = {SPT_CTECONFIG_T28,
  22.                 1, 0, 3, 16, 63, 60};
  23. diff --git a/drivers/input/touchscreen/mxt224.c b/drivers/input/touchscreen/mxt224.c
  24. index 07143b1..ad8082b 100644
  25. --- a/drivers/input/touchscreen/mxt224.c
  26. +++ b/drivers/input/touchscreen/mxt224.c
  27. @@ -30,6 +30,7 @@
  28.  
  29.  #define CMD_RESET_OFFSET       0
  30.  #define CMD_BACKUP_OFFSET      1
  31. +#define CMD_CALIBRATE_OFFSET       2 /* according to atmel_mxt_ts.c from 2.6.39 kernel */
  32.  
  33.  #define DETECT_MSG_MASK            0x80
  34.  #define PRESS_MSG_MASK         0x40
  35. @@ -129,6 +130,12 @@ static int __devinit mxt224_backup(struct mxt224_data *data)
  36.     return write_mem(data, data->cmd_proc + CMD_BACKUP_OFFSET, 1, &buf);
  37.  }
  38.  
  39. +static int __devinit mxt224_calibrate(struct mxt224_data *data)
  40. +{
  41. +   u8 buf = 0x55u; /* according to comment in Motorola's Droid X source, non-zero value forces calibration */
  42. +   return write_mem(data, data->cmd_proc + CMD_CALIBRATE_OFFSET, 1, &buf);
  43. +}
  44. +
  45.  static int get_object_info(struct mxt224_data *data, u8 object_type, u16 *size,
  46.                 u16 *address)
  47.  {
  48. @@ -404,6 +411,10 @@ static int mxt224_internal_resume(struct mxt224_data *data)
  49.  
  50.     data->power_on();
  51.  
  52. +   /* reset after resume */
  53. +   ret = mxt224_reset(data);
  54. +   msleep(20);
  55. +
  56.     i = 0;
  57.     do {
  58.         ret = write_config(data, GEN_POWERCONFIG_T7, data->power_cfg);
  59. @@ -411,6 +422,9 @@ static int mxt224_internal_resume(struct mxt224_data *data)
  60.         i++;
  61.     } while (ret && i < 10);
  62.  
  63. +   /* calibrate after resume */
  64. +   mxt224_calibrate(data);
  65. +
  66.     return ret;
  67.  }
RAW Paste Data