mako: touch: disable ghost finger correction
The ghost function sets FORCE_FAST_RELAXATION and FORCE_UPDATE registers, which cause touch abnormal function after resume. Also code clean up for register map initialization. Change-Id: Ib442d4d7a2e995048fba902fe852a3851fdbf418
This commit is contained in:
committed by
Iliyan Malchev
parent
d1c0aa6903
commit
d8943732ca
@@ -390,6 +390,8 @@ static int touch_ic_init(struct lge_touch_data *ts)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FIXME: Disable Ghost Stage due to touch mal function
|
||||||
|
#if 0
|
||||||
if (ts->gf_ctrl.stage & GHOST_STAGE_2) {
|
if (ts->gf_ctrl.stage & GHOST_STAGE_2) {
|
||||||
ts->gf_ctrl.stage = GHOST_STAGE_2 | GHOST_STAGE_3;
|
ts->gf_ctrl.stage = GHOST_STAGE_2 | GHOST_STAGE_3;
|
||||||
if (touch_device_func->ic_ctrl) {
|
if (touch_device_func->ic_ctrl) {
|
||||||
@@ -421,6 +423,7 @@ static int touch_ic_init(struct lge_touch_data *ts)
|
|||||||
TOUCH_INFO_MSG("irq_pin[%d] next_work[%d] ghost_stage[0x%x]\n",
|
TOUCH_INFO_MSG("irq_pin[%d] next_work[%d] ghost_stage[0x%x]\n",
|
||||||
int_pin, next_work, ts->gf_ctrl.stage);
|
int_pin, next_work, ts->gf_ctrl.stage);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ts->gf_ctrl.count = 0;
|
ts->gf_ctrl.count = 0;
|
||||||
ts->gf_ctrl.ghost_check_count = 0;
|
ts->gf_ctrl.ghost_check_count = 0;
|
||||||
|
|||||||
@@ -375,9 +375,7 @@ static int read_page_description_table(struct i2c_client* client)
|
|||||||
ts->finger_dsc.id = 0;
|
ts->finger_dsc.id = 0;
|
||||||
ts->button_dsc.id = 0;
|
ts->button_dsc.id = 0;
|
||||||
ts->flash_dsc.id = 0;
|
ts->flash_dsc.id = 0;
|
||||||
#if defined(CONFIG_TOUCH_REG_MAP_TM2000) || defined(CONFIG_TOUCH_REG_MAP_TM2372)
|
|
||||||
ts->analog_dsc.id = 0;
|
ts->analog_dsc.id = 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
for (u_address = DESCRIPTION_TABLE_START; u_address > 10;
|
for (u_address = DESCRIPTION_TABLE_START; u_address > 10;
|
||||||
u_address -= sizeof(struct ts_function_descriptor)) {
|
u_address -= sizeof(struct ts_function_descriptor)) {
|
||||||
@@ -399,6 +397,7 @@ static int read_page_description_table(struct i2c_client* client)
|
|||||||
break;
|
break;
|
||||||
case FLASH_MEMORY_MANAGEMENT:
|
case FLASH_MEMORY_MANAGEMENT:
|
||||||
ts->flash_dsc = buffer;
|
ts->flash_dsc = buffer;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -408,18 +407,13 @@ static int read_page_description_table(struct i2c_client* client)
|
|||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
u_address = DESCRIPTION_TABLE_START;
|
if (unlikely(touch_i2c_read(client, ANALOG_TABLE_START, sizeof(buffer), (unsigned char *)&buffer) < 0)) {
|
||||||
|
|
||||||
if (unlikely(touch_i2c_read(client, u_address, sizeof(buffer),
|
|
||||||
(unsigned char *)&buffer) < 0)) {
|
|
||||||
TOUCH_ERR_MSG("RMI4 Function Descriptor read fail\n");
|
TOUCH_ERR_MSG("RMI4 Function Descriptor read fail\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (buffer.id) {
|
if (buffer.id == ANALOG_CONTROL) {
|
||||||
case ANALOG_CONTROL:
|
|
||||||
ts->analog_dsc = buffer;
|
ts->analog_dsc = buffer;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(touch_i2c_write_byte(client, PAGE_SELECT_REG, 0x02) < 0)) {
|
if (unlikely(touch_i2c_write_byte(client, PAGE_SELECT_REG, 0x02) < 0)) {
|
||||||
@@ -427,19 +421,13 @@ static int read_page_description_table(struct i2c_client* client)
|
|||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
u_address -= sizeof(struct ts_function_descriptor);
|
if (unlikely(touch_i2c_read(ts->client, BUTTON_TABLE_START, sizeof(buffer), (unsigned char *)&buffer))) {
|
||||||
|
|
||||||
if (unlikely(touch_i2c_read(ts->client, u_address, sizeof(buffer),
|
|
||||||
(unsigned char *)&buffer))) {
|
|
||||||
TOUCH_ERR_MSG("Button ts_function_descriptor read fail\n");
|
TOUCH_ERR_MSG("Button ts_function_descriptor read fail\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (buffer.id) {
|
if (buffer.id == CAPACITIVE_BUTTON_SENSORS)
|
||||||
case CAPACITIVE_BUTTON_SENSORS:
|
|
||||||
ts->button_dsc = buffer;
|
ts->button_dsc = buffer;
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (unlikely(touch_i2c_write_byte(client, PAGE_SELECT_REG, 0x00) < 0)) {
|
if (unlikely(touch_i2c_write_byte(client, PAGE_SELECT_REG, 0x00) < 0)) {
|
||||||
TOUCH_ERR_MSG("PAGE_SELECT_REG write fail\n");
|
TOUCH_ERR_MSG("PAGE_SELECT_REG write fail\n");
|
||||||
@@ -911,6 +899,9 @@ int synaptics_ts_ic_ctrl(struct i2c_client *client, u8 code, u16 value)
|
|||||||
case IC_CTRL_BASELINE:
|
case IC_CTRL_BASELINE:
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case BASELINE_OPEN:
|
case BASELINE_OPEN:
|
||||||
|
if (!ts->analog_dsc.id) /* If not supported, ignore */
|
||||||
|
break;
|
||||||
|
|
||||||
#if defined(CONFIG_TOUCH_REG_MAP_TM2000) || defined(CONFIG_TOUCH_REG_MAP_TM2372)
|
#if defined(CONFIG_TOUCH_REG_MAP_TM2000) || defined(CONFIG_TOUCH_REG_MAP_TM2372)
|
||||||
if (unlikely(touch_i2c_write_byte(client,
|
if (unlikely(touch_i2c_write_byte(client,
|
||||||
PAGE_SELECT_REG, 0x01) < 0)) {
|
PAGE_SELECT_REG, 0x01) < 0)) {
|
||||||
@@ -952,6 +943,9 @@ int synaptics_ts_ic_ctrl(struct i2c_client *client, u8 code, u16 value)
|
|||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case BASELINE_FIX:
|
case BASELINE_FIX:
|
||||||
|
if (!ts->analog_dsc.id) /* If not supported, ignore */
|
||||||
|
break;
|
||||||
|
|
||||||
#if defined(CONFIG_TOUCH_REG_MAP_TM2000) || defined(CONFIG_TOUCH_REG_MAP_TM2372)
|
#if defined(CONFIG_TOUCH_REG_MAP_TM2000) || defined(CONFIG_TOUCH_REG_MAP_TM2372)
|
||||||
if (unlikely(touch_i2c_write_byte(client,
|
if (unlikely(touch_i2c_write_byte(client,
|
||||||
PAGE_SELECT_REG, 0x01) < 0)) {
|
PAGE_SELECT_REG, 0x01) < 0)) {
|
||||||
|
|||||||
@@ -27,6 +27,8 @@
|
|||||||
#define MAX_NUM_OF_FINGERS 10
|
#define MAX_NUM_OF_FINGERS 10
|
||||||
|
|
||||||
#define DESCRIPTION_TABLE_START 0xe9
|
#define DESCRIPTION_TABLE_START 0xe9
|
||||||
|
#define ANALOG_TABLE_START 0xe9
|
||||||
|
#define BUTTON_TABLE_START 0xe3
|
||||||
|
|
||||||
struct ts_function_descriptor {
|
struct ts_function_descriptor {
|
||||||
u8 query_base;
|
u8 query_base;
|
||||||
|
|||||||
Reference in New Issue
Block a user