From c91d07d34cd3e2e0b8573afa0ebe28a2942cc5f6 Mon Sep 17 00:00:00 2001 From: hujing3 Date: Tue, 14 Dec 2021 19:25:34 +0800 Subject: [PATCH] focaltech_v3_mmi: enable firmware download focaltech_v3_mmi: enable firmware download Change-Id: I579fdf98223ea1c11e437367a0d59505441a0111 Signed-off-by: hujing3 Reviewed-on: https://gerrit.mot.com/2144086 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- .../touchscreen/focaltech_v3_mmi/focaltech_config.h | 2 +- .../input/touchscreen/focaltech_v3_mmi/focaltech_flash.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/focaltech_v3_mmi/focaltech_config.h b/drivers/input/touchscreen/focaltech_v3_mmi/focaltech_config.h index 425621b9e62a..026aad9a2eec 100644 --- a/drivers/input/touchscreen/focaltech_v3_mmi/focaltech_config.h +++ b/drivers/input/touchscreen/focaltech_v3_mmi/focaltech_config.h @@ -253,7 +253,7 @@ /* * auto upgrade */ -#define FTS_AUTO_UPGRADE_EN 0 +#define FTS_AUTO_UPGRADE_EN 1 /* * auto upgrade for lcd cfg diff --git a/drivers/input/touchscreen/focaltech_v3_mmi/focaltech_flash.c b/drivers/input/touchscreen/focaltech_v3_mmi/focaltech_flash.c index df566d308612..ff177d7dd1d8 100644 --- a/drivers/input/touchscreen/focaltech_v3_mmi/focaltech_flash.c +++ b/drivers/input/touchscreen/focaltech_v3_mmi/focaltech_flash.c @@ -38,7 +38,7 @@ /***************************************************************************** * Private constant and macro definitions using #define *****************************************************************************/ -#define FTS_FW_REQUEST_SUPPORT 0 +#define FTS_FW_REQUEST_SUPPORT 1 /* Example: focaltech_ts_fw_tianma.bin */ #define FTS_FW_NAME_PREX_WITH_REQUEST "focaltech_ts_fw_" @@ -1870,6 +1870,13 @@ static int fts_get_fw_file_via_request_firmware(struct fts_upgrade *upg) return -EINVAL; } + if (fts_data->panel_supplier) { + FTS_INFO("fts_data->panel_supplier=%s\n", fts_data->panel_supplier); + snprintf(fwname, FILE_NAME_LENGTH, "%s%s.bin", \ + FTS_FW_NAME_PREX_WITH_REQUEST, \ + fts_data->panel_supplier); + } + else snprintf(fwname, FILE_NAME_LENGTH, "%s%s.bin", \ FTS_FW_NAME_PREX_WITH_REQUEST, \ upg->module_info->vendor_name);