summaryrefslogtreecommitdiff
path: root/ft3658/focaltech_core.c
diff options
context:
space:
mode:
authorMason Wang <masonwang@google.com>2022-02-25 07:06:59 +0000
committerMason Wang <masonwang@google.com>2022-02-25 07:06:59 +0000
commitb178cfa5ba742fc433685653c20c60c78a5d1678 (patch)
treef13652af4f72c299cbc886e8420f1c424b16d617 /ft3658/focaltech_core.c
parent26218102eb40b830febd9c65621bed1ac63a27f2 (diff)
downloadfocaltech_touch-b178cfa5ba742fc433685653c20c60c78a5d1678.tar.gz
Revert "touch/focaltech: update major/minor/pressure format."
Revert submission 2152470-p10_touch_fw_v07 Reason for revert: Block other team to release kernel image. Reverted Changes: I18ff63837:touch/focaltech: update major/minor/pressure forma... I4c70235b7:touch/focaltech: get into deep sleep mode in AP si... Change-Id: Ic940f8bc30890065b63be750ba094fc8953d0ffd
Diffstat (limited to 'ft3658/focaltech_core.c')
-rw-r--r--ft3658/focaltech_core.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/ft3658/focaltech_core.c b/ft3658/focaltech_core.c
index cdf031d..fa6dc87 100644
--- a/ft3658/focaltech_core.c
+++ b/ft3658/focaltech_core.c
@@ -541,13 +541,10 @@ static int fts_input_report_b(struct fts_ts_data *data)
if ((data->log_level >= 2) ||
((1 == data->log_level) && (FTS_TOUCH_DOWN == events[i].flag))) {
- FTS_DEBUG("[B]P%d(%d, %d)[ma:%d,mi:%d,p:%d] DOWN!",
+ FTS_DEBUG("[B]P%d(%d, %d)[p:%d,tm:%d] DOWN!",
events[i].id,
- events[i].x,
- events[i].y,
- events[i].major,
- events[i].minor,
- events[i].p);
+ events[i].x, events[i].y,
+ events[i].p, events[i].area);
}
} else {
uppoint++;
@@ -623,13 +620,10 @@ static int fts_input_report_a(struct fts_ts_data *data)
if ((data->log_level >= 2) ||
((1 == data->log_level) && (FTS_TOUCH_DOWN == events[i].flag))) {
- FTS_DEBUG("[A]P%d(%d, %d)[ma:%d,mi:%d,p:%d] DOWN!",
+ FTS_DEBUG("[A]P%d(%d, %d)[p:%d,tm:%d] DOWN!",
events[i].id,
- events[i].x,
- events[i].y,
- events[i].major,
- events[i].minor,
- events[i].p);
+ events[i].x, events[i].y,
+ events[i].p, events[i].area);
}
touchs++;
}
@@ -881,10 +875,10 @@ static int fts_read_parse_touchdata(struct fts_ts_data *data)
(buf[FTS_TOUCH_Y_L_POS + base] & 0xFF);
events[i].flag = buf[FTS_TOUCH_EVENT_POS + base] >> 6;
events[i].id = buf[FTS_TOUCH_ID_POS + base] >> 4;
- events[i].p = ((buf[FTS_TOUCH_AREA_POS + base] << 1) & 0x02) +
- (buf[FTS_TOUCH_PRE_POS + base] & 0x01);
- events[i].minor = (buf[FTS_TOUCH_PRE_POS + base] >> 1) & 0x7F;
- events[i].major = (buf[FTS_TOUCH_AREA_POS + base] >> 1) & 0x7F;
+ events[i].p = buf[FTS_TOUCH_PRE_POS + base] & 0x1F;
+ events[i].minor = ((buf[FTS_TOUCH_PRE_POS + base] >> 3) & 0x1C) +
+ (buf[FTS_TOUCH_AREA_POS + base] & 0x03);
+ events[i].major = (buf[FTS_TOUCH_AREA_POS + base] >> 2) & 0x3F;
if (EVENT_DOWN(events[i].flag) && (data->point_num == 0)) {
FTS_INFO("abnormal touch data from fw");
@@ -1250,9 +1244,9 @@ static int fts_input_init(struct fts_ts_data *ts_data)
input_set_abs_params(input_dev, ABS_MT_POSITION_X, pdata->x_min, pdata->x_max, 0, 0);
input_set_abs_params(input_dev, ABS_MT_POSITION_Y, pdata->y_min, pdata->y_max, 0, 0);
input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 0x3F, 0, 0);
- input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR, 0, 0x3F, 0, 0);
+ input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR, 0, 0x1F, 0, 0);
#if FTS_REPORT_PRESSURE_EN
- input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, 0x03, 0, 0);
+ input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, 0x1F, 0, 0);
#endif
ret = input_register_device(input_dev);