From 3af870153b7ebd65e7f7cc30c7a55420e44beda4 Mon Sep 17 00:00:00 2001 From: Xiaojun Lv Date: Tue, 31 Jan 2023 11:01:40 +0800 Subject: [PATCH] input: fix the disappearance of ili7807s stylus handwriting Fingers touch the screen when stylus writing, resulting in the disappearance of handwriting. In DDA mode, app reads the absolute value of pressure. Modify the reporting of pressure value to fix the problem. Change-Id: I4b4c6d45f5099a5b895fb49dc1ac70f8950b7152 Reviewed-on: https://gerrit.mot.com/2497928 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yeqing Wang Reviewed-by: Jun Weng Reviewed-by: Huosheng Liao Submit-Approved: Jira Key --- drivers/input/touchscreen/ili9882_mmi/ili9882_qcom.c | 2 +- drivers/input/touchscreen/ili9882_mmi/ili9882_touch.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/ili9882_mmi/ili9882_qcom.c b/drivers/input/touchscreen/ili9882_mmi/ili9882_qcom.c index ad324b3d012e..3d7caa5676ef 100755 --- a/drivers/input/touchscreen/ili9882_mmi/ili9882_qcom.c +++ b/drivers/input/touchscreen/ili9882_mmi/ili9882_qcom.c @@ -108,7 +108,7 @@ void ili_input_register(void) } if (MT_PRESSURE) - input_set_abs_params(ilits->input, ABS_MT_PRESSURE, 0, 255, 0, 0); + input_set_abs_params(ilits->input, ABS_MT_PRESSURE, 0, 1000, 0, 0); if (MT_B_TYPE) { #if KERNEL_VERSION(3, 7, 0) <= LINUX_VERSION_CODE diff --git a/drivers/input/touchscreen/ili9882_mmi/ili9882_touch.c b/drivers/input/touchscreen/ili9882_mmi/ili9882_touch.c index 765deb3b2b47..cecc50d6d48b 100755 --- a/drivers/input/touchscreen/ili9882_mmi/ili9882_touch.c +++ b/drivers/input/touchscreen/ili9882_mmi/ili9882_touch.c @@ -1040,7 +1040,7 @@ void ili_report_ap_mode(u8 *buf, int len) if (MT_PRESSURE) { if (TOUCH_WIDTH) { - touch_info[ilits->finger].pressure = buf[(4 * i) + 4 + P5_X_DEMO_MODE_PACKET_INFO_LEN]; + touch_info[ilits->finger].pressure =(buf[(4 * i) + 4 + P5_X_DEMO_MODE_PACKET_INFO_LEN])<<2; } else { touch_info[ilits->finger].pressure = buf[(4 * i) + 4]; }