diff options
author | Mason Wang <masonwang@google.com> | 2022-04-20 00:33:51 +0000 |
---|---|---|
committer | Android Partner Code Review <android-gerrit-partner@google.com> | 2022-04-20 00:33:51 +0000 |
commit | 522ee2c12c4797cf5f310d7692e1e55db942d315 (patch) | |
tree | 58165ef334fe5c778ae3743ba8156aee65c70827 /ft3658/focaltech_core.c | |
parent | a5ca60116433a337fa60f5b8851dc260217a9a21 (diff) | |
parent | 5455dd88d6849658de4cbf1d7cad09bee4c01aa5 (diff) | |
download | focaltech_touch-522ee2c12c4797cf5f310d7692e1e55db942d315.tar.gz |
Merge "touch/focaltech: Using a flag instead of accessing work-mode register." into android13-gs-pixel-5.10
Diffstat (limited to 'ft3658/focaltech_core.c')
-rw-r--r-- | ft3658/focaltech_core.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/ft3658/focaltech_core.c b/ft3658/focaltech_core.c index 7fd13e9..5a2d60b 100644 --- a/ft3658/focaltech_core.c +++ b/ft3658/focaltech_core.c @@ -790,17 +790,6 @@ static int fts_read_touchdata(struct fts_ts_data *data) return 0; } -#if GOOGLE_REPORT_MODE -static int get_work_mode(void) { - int ret = 0; - u8 mode = 0; - ret = fts_read_reg(FTS_REG_WORKMODE, &mode); - if (ret == 0) - return mode; - return ret; -} -#endif - static int fts_read_parse_touchdata(struct fts_ts_data *data) { int ret = 0; @@ -813,7 +802,6 @@ static int fts_read_parse_touchdata(struct fts_ts_data *data) #if GOOGLE_REPORT_MODE u8 get_regB2_status = 0; u8 check_regB2_status = 0; - u8 work_mode; u8 current_hopping = 0; u8 new_hopping = 0; #endif @@ -830,8 +818,7 @@ static int fts_read_parse_touchdata(struct fts_ts_data *data) #endif #if GOOGLE_REPORT_MODE - work_mode = get_work_mode(); - if (work_mode >= 0 && work_mode == FTS_REG_WORKMODE_WORK_VALUE ) { + if (data->work_mode == FTS_REG_WORKMODE_WORK_VALUE) { fts_read_reg(FTS_REG_CUSTOMER_STATUS, &get_regB2_status); check_regB2_status = get_regB2_status ^ current_host_status ; if (check_regB2_status) { // current_status is different with previous_status @@ -2886,6 +2873,7 @@ static int fts_ts_probe_entry(struct fts_ts_data *ts_data) register_early_suspend(&ts_data->early_suspend); #endif + ts_data->work_mode = FTS_REG_WORKMODE_WORK_VALUE; #if GOOGLE_REPORT_MODE fts_read_reg(FTS_REG_CUSTOMER_STATUS, ¤t_host_status); if ((current_host_status & 0x03) < 3) { |