diff --git a/arch/arm/mach-s5pv210/mach-herring.c b/arch/arm/mach-s5pv210/mach-herring.c index 7593c7e..af74a5b 100755 --- a/arch/arm/mach-s5pv210/mach-herring.c +++ b/arch/arm/mach-s5pv210/mach-herring.c @@ -2248,7 +2248,7 @@ static u8 t7_config[] = {GEN_POWERCONFIG_T7, static u8 t8_config[] = {GEN_ACQUISITIONCONFIG_T8, 7, 0, 5, 0, 0, 0, 9, 35}; static u8 t9_config[] = {TOUCH_MULTITOUCHSCREEN_T9, - 139, 0, 0, 19, 11, 0, 32, 25, 2, 1, 25, 3, 1, + 139, 0, 0, 19, 11, 0, 28, 36, 2, 1, 25, 3, 1, 46, MXT224_MAX_MT_FINGERS, 5, 14, 10, 255, 3, 255, 3, 18, 18, 10, 10, 141, 65, 143, 110, 18}; static u8 t18_config[] = {SPT_COMCONFIG_T18, @@ -2256,7 +2256,7 @@ static u8 t18_config[] = {SPT_COMCONFIG_T18, static u8 t20_config[] = {PROCI_GRIPFACESUPPRESSION_T20, 7, 0, 0, 0, 0, 0, 0, 80, 40, 4, 35, 10}; static u8 t22_config[] = {PROCG_NOISESUPPRESSION_T22, - 5, 0, 0, 0, 0, 0, 0, 3, 30, 0, 0, 29, 34, 39, + 5, 0, 0, 0, 0, 0, 0, 3, 20, 0, 0, 29, 34, 39, 49, 58, 3}; static u8 t28_config[] = {SPT_CTECONFIG_T28, 1, 0, 3, 16, 63, 60}; diff --git a/drivers/input/touchscreen/mxt224.c b/drivers/input/touchscreen/mxt224.c index 07143b1..ad8082b 100644 --- a/drivers/input/touchscreen/mxt224.c +++ b/drivers/input/touchscreen/mxt224.c @@ -30,6 +30,7 @@ #define CMD_RESET_OFFSET 0 #define CMD_BACKUP_OFFSET 1 +#define CMD_CALIBRATE_OFFSET 2 /* according to atmel_mxt_ts.c from 2.6.39 kernel */ #define DETECT_MSG_MASK 0x80 #define PRESS_MSG_MASK 0x40 @@ -129,6 +130,12 @@ static int __devinit mxt224_backup(struct mxt224_data *data) return write_mem(data, data->cmd_proc + CMD_BACKUP_OFFSET, 1, &buf); } +static int __devinit mxt224_calibrate(struct mxt224_data *data) +{ + u8 buf = 0x55u; /* according to comment in Motorola's Droid X source, non-zero value forces calibration */ + return write_mem(data, data->cmd_proc + CMD_CALIBRATE_OFFSET, 1, &buf); +} + static int get_object_info(struct mxt224_data *data, u8 object_type, u16 *size, u16 *address) { @@ -404,6 +411,10 @@ static int mxt224_internal_resume(struct mxt224_data *data) data->power_on(); + /* reset after resume */ + ret = mxt224_reset(data); + msleep(20); + i = 0; do { ret = write_config(data, GEN_POWERCONFIG_T7, data->power_cfg); @@ -411,6 +422,9 @@ static int mxt224_internal_resume(struct mxt224_data *data) i++; } while (ret && i < 10); + /* calibrate after resume */ + mxt224_calibrate(data); + return ret; }