summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2022-11-27 19:37:05 -0800
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2022-11-27 19:37:06 -0800
commit6bcb4a30759b403a9cb5043cddd8a45ad834cbcb (patch)
tree92e3cfef9c5d0ab4417d264e35bd03cb14593159
parentded5879e7e7cb4ba7984c942e3b6d1157e40b5cd (diff)
parenteb0519a7447c6b19c400acb24924e0db3df1269b (diff)
downloadfocaltech_touch-android-gs-raviole-5.10-t-qpr3-beta-2.tar.gz
Merge android13-gs-pixel-5.10-tm-qpr2 into android13-gs-pixel-5.10-tm-qpr3android-t-qpr3-beta-3_r0.5android-t-qpr3-beta-3_r0.4android-t-qpr3-beta-3_r0.3android-t-qpr3-beta-3.1_r0.5android-t-qpr3-beta-3.1_r0.4android-t-qpr3-beta-3.1_r0.3android-t-qpr3-beta-2_r0.5android-t-qpr3-beta-2_r0.4android-t-qpr3-beta-2_r0.3android-t-qpr3-beta-1_r0.5android-t-qpr3-beta-1_r0.4android-t-qpr3-beta-1_r0.3android-t-qpr3-beta-1_r0.1android-13.0.0_r0.93android-13.0.0_r0.92android-13.0.0_r0.85android-13.0.0_r0.84android-13.0.0_r0.83android-13.0.0_r0.82android-13.0.0_r0.127android-13.0.0_r0.126android-13.0.0_r0.125android-13.0.0_r0.124android-13.0.0_r0.123android-13.0.0_r0.121android-13.0.0_r0.117android-13.0.0_r0.116android-13.0.0_r0.115android-13.0.0_r0.114android-13.0.0_r0.113android-13.0.0_r0.112android-13.0.0_r0.107android-13.0.0_r0.106android-13.0.0_r0.105android-13.0.0_r0.104android-13.0.0_r0.103android-13.0.0_r0.100android-gs-tangorpro-5.10-android13-qpr3android-gs-raviole-5.10-t-qpr3-beta-3android-gs-raviole-5.10-t-qpr3-beta-2android-gs-raviole-5.10-android13-qpr3-beta1android-gs-raviole-5.10-android13-qpr3android-gs-pantah-5.10-t-qpr3-beta-3android-gs-pantah-5.10-t-qpr3-beta-2android-gs-pantah-5.10-android13-qpr3-beta1android-gs-pantah-5.10-android13-qpr3android-gs-lynx-5.10-android13-qpr3android-gs-felix-5.10-android13-qpr3-candroid-gs-felix-5.10-android13-qpr3android-gs-felix-5.10-android13-d3android-gs-bluejay-5.10-t-qpr3-beta-3android-gs-bluejay-5.10-t-qpr3-beta-2android-gs-bluejay-5.10-android13-qpr3-beta1android-gs-bluejay-5.10-android13-qpr3
SBMerger: 478053055 Change-Id: If72b4669c4b4a277dd6cf7b09ff9ff921ec5d1ac Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r--ft3658/focaltech_core.c40
-rw-r--r--ft3658/focaltech_core.h5
2 files changed, 18 insertions, 27 deletions
diff --git a/ft3658/focaltech_core.c b/ft3658/focaltech_core.c
index d778ce7..aa2c3ca 100644
--- a/ft3658/focaltech_core.c
+++ b/ft3658/focaltech_core.c
@@ -56,9 +56,6 @@
/*****************************************************************************
* Private constant and macro definitions using #define
*****************************************************************************/
-#if GOOGLE_REPORT_MODE
-const short int hopping_freq[4] = {277, 237, 112, 0};
-#endif
#define FTS_DRIVER_NAME "fts_ts"
#define FTS_DRIVER_PEN_NAME "fts_ts,pen"
#define INTERVAL_READ_REG 200 /* unit:ms */
@@ -91,8 +88,8 @@ static int fts_ts_resume(struct device *dev);
static void fts_update_motion_filter(struct fts_ts_data *ts, u8 touches);
static char *status_list_str[STATUS_CNT_END] = {
- "Hopping",
- "reserved",
+ "Baseline refreshed",
+ "Baseline refreshed",
"Palm",
"Water",
"Grip",
@@ -108,6 +105,14 @@ static char *feature_list_str[FW_CNT_END] = {
"FW_HEATMAP",
"FW_CONTINUOUS",
};
+
+static char *status_baseline_refresh_str[4] = {
+ "Baseline refreshed: none",
+ "Baseline refreshed: removing touch",
+ "Baseline refreshed: removing water",
+ "Baseline refreshed: removing shell iron",
+};
+
int fts_check_cid(struct fts_ts_data *ts_data, u8 id_h)
{
int i = 0;
@@ -807,8 +812,6 @@ static int fts_read_touchdata(struct fts_ts_data *data)
#if IS_ENABLED(GOOGLE_REPORT_MODE)
u8 regB2_data[FTS_CUSTOMER_STATUS_LEN] = { 0 };
u8 check_regB2_status[2] = { 0 };
- u8 current_hopping = 0;
- u8 new_hopping = 0;
int i;
if (data->work_mode == FTS_REG_WORKMODE_WORK_VALUE) {
@@ -862,19 +865,10 @@ static int fts_read_touchdata(struct fts_ts_data *data)
check_regB2_status[0] = regB2_data[0] ^ data->current_host_status[0] ;
if (check_regB2_status[0]) { // current_status is different with previous_status
- for(i = STATUS_HOPPING; i < STATUS_CNT_END; i++) {
- if (i == STATUS_HOPPING) {
- current_hopping = data->current_host_status[0] & 0x03;
- new_hopping = regB2_data[0] & 0x03;
- if (current_hopping != new_hopping &&
- current_hopping < 3 &&
- new_hopping < 3) {
- FTS_INFO("-------%s (%dKhz => %dKhz)\n",
- status_list_str[i],
- hopping_freq[current_hopping],
- hopping_freq[new_hopping]);
- i++;
- }
+ for (i = STATUS_BASELINE_REFRESH_B1; i < STATUS_CNT_END; i++) {
+ if ((i == STATUS_BASELINE_REFRESH_B1) && (check_regB2_status[0] & 0x03)) {
+ FTS_INFO("-------%s\n",
+ status_baseline_refresh_str[regB2_data[0] & 0x03]);
} else {
bool status_changed = check_regB2_status[0] & (1 << i);
bool new_status = regB2_data[0] & (1 << i);
@@ -899,7 +893,7 @@ static int fts_read_touchdata(struct fts_ts_data *data)
bool feature_enabled;
FTS_ERROR("FW settings dose not match host side, host: 0x%x, B2[1]:0x%x\n",
data->current_host_status[1], regB2_data[1]);
- for(i = FW_GLOVE; i < FW_CNT_END; i++) {
+ for (i = FW_GLOVE; i < FW_CNT_END; i++) {
feature_changed = check_regB2_status[1] & (1 << i);
feature_enabled = regB2_data[1] & (1 << i);
if (feature_changed) {
@@ -3167,10 +3161,6 @@ static int fts_ts_probe_entry(struct fts_ts_data *ts_data)
ts_data->work_mode = FTS_REG_WORKMODE_WORK_VALUE;
#if GOOGLE_REPORT_MODE
fts_read_reg(FTS_REG_CUSTOMER_STATUS, &ts_data->current_host_status[0]);
- if ((ts_data->current_host_status[0] & 0x03) < 3) {
- FTS_DEBUG("-------Hopping %dKhz\n",
- hopping_freq[(ts_data->current_host_status[0] & 0x03)]);
- }
FTS_INFO("-------Palm mode %s\n",
(ts_data->current_host_status[0] & (1 << STATUS_PALM)) ? "enter" : "exit");
FTS_INFO("-------Water mode %s\n",
diff --git a/ft3658/focaltech_core.h b/ft3658/focaltech_core.h
index f8afe13..c86c92d 100644
--- a/ft3658/focaltech_core.h
+++ b/ft3658/focaltech_core.h
@@ -372,8 +372,9 @@ enum FTS_BUS_TYPE {
#if GOOGLE_REPORT_MODE
enum FTS_CUSTOMER_STATUS {
- STATUS_HOPPING = 0,
- STATUS_PALM = 2,
+ STATUS_BASELINE_REFRESH_B0,
+ STATUS_BASELINE_REFRESH_B1,
+ STATUS_PALM,
STATUS_WATER,
STATUS_GRIP,
STATUS_GLOVE,