diff options
Diffstat (limited to 'ft3658')
-rw-r--r-- | ft3658/focaltech_common.h | 1 | ||||
-rw-r--r-- | ft3658/focaltech_core.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/ft3658/focaltech_common.h b/ft3658/focaltech_common.h index 1b3af7c..11352d7 100644 --- a/ft3658/focaltech_common.h +++ b/ft3658/focaltech_common.h @@ -142,6 +142,7 @@ // bit 7 : LPWG #define FTS_CAP_DATA_OFFSET 91 #define FTS_SELF_DATA_LEN 68 +#define FTS_PRESSURE_SCALE 85 // 255 / 3 #define FTS_SYSFS_ECHO_ON(buf) (buf[0] == '1') #define FTS_SYSFS_ECHO_OFF(buf) (buf[0] == '0') diff --git a/ft3658/focaltech_core.c b/ft3658/focaltech_core.c index 676e485..8415a0d 100644 --- a/ft3658/focaltech_core.c +++ b/ft3658/focaltech_core.c @@ -956,8 +956,9 @@ 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].p = (((buf[FTS_TOUCH_AREA_POS + base] << 1) & 0x02) + + (buf[FTS_TOUCH_PRE_POS + base] & 0x01)) * + FTS_PRESSURE_SCALE; events[i].minor = ((buf[FTS_TOUCH_PRE_POS + base] >> 1) & 0x7F) * data->pdata->mm2px; events[i].major = @@ -1841,7 +1842,7 @@ static int fts_input_init(struct fts_ts_data *ts_data) 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); #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, 0xFF, 0, 0); #endif ret = input_register_device(input_dev); |