From 713f4fb6864ac6eb062fdb02dffa83393f41deeb Mon Sep 17 00:00:00 2001 From: wengjun1 Date: Thu, 25 Jul 2019 17:18:28 +0800 Subject: [PATCH] DLKM: touch: Support CQA test for ft8756 Since the firmware size of ft8756 will exceed 64K, so the CQA test jar and ini need to be changed, at the same time have to change touch driver to match this change.Now we need to increase size when calling download firmware function. Change-Id: Icea129ab53663006ebedce0af1ff0ba5b8a03f1d Signed-off-by: wengjun1 Reviewed-on: https://gerrit.mot.com/1391750 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yang Yang Reviewed-by: Jialei Hao Reviewed-by: Huosheng Liao Submit-Approved: Jira Key --- .../touchscreen/focaltech_0flash_mmi/focaltech_flash.c | 8 ++++++++ .../touchscreen/focaltech_0flash_mmi/focaltech_flash.h | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_flash.c b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_flash.c index 2f85144cde9b..8a2b9e9c1164 100755 --- a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_flash.c +++ b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_flash.c @@ -235,13 +235,21 @@ int fts_enter_test_environment(bool test_state) return -EINVAL; } +#ifdef CONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME_FT8756 + if (!upg->fw || (upg->fw_length <= FTS_MAX_LEN_APP_FT8756)) { +#else if (!upg->fw || (upg->fw_length <= FTS_MAX_LEN_APP)) { +#endif FTS_INFO("not multi-app"); return 0; } if (test_state) { +#ifdef CONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME_FT8756 + ret = fts_fw_download(upg->fw + FTS_MAX_LEN_APP_FT8756, upg->fw_length, true); +#else ret = fts_fw_download(upg->fw + FTS_MAX_LEN_APP, upg->fw_length, true); +#endif } else { ret = fts_fw_download(upg->fw, upg->fw_length, true); } diff --git a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_flash.h b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_flash.h index f15c1ee93690..458f774bbfc8 100755 --- a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_flash.h +++ b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_flash.h @@ -72,6 +72,7 @@ #define FTS_MAX_LEN_ECC_CALC 0xFFFE /* must be even */ #define FTS_MIN_LEN 0x120 #define FTS_MAX_LEN_FILE (128 * 1024) +#define FTS_MAX_LEN_APP_FT8756 (88 * 1024) #define FTS_MAX_LEN_APP (64 * 1024) #define FTS_MAX_LEN_APP_PARAMS (32 * 1024) #define FTS_MAX_LEN_SECTOR (4 * 1024)