From bd87473f10815cdec595a03b304b9fad78d8fc5a Mon Sep 17 00:00:00 2001 From: wangyq13 Date: Thu, 31 Oct 2019 14:26:09 +0800 Subject: [PATCH] himax uses two firmwares: daily use and factory himax_v2: Himax uses two firmwares: daily use and factory. Daily use firmware includes more effect and gestures, so it's bigger. We cannot merge daily use firmware and factory firmware, it exceeds IC sram limit. Change-Id: Icf2574bc9fbb7e20558b17dee3e898b7a96da0c3 Signed-off-by: wangyq13 Reviewed-on: https://gerrit.mot.com/1447041 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jun Weng Reviewed-by: Huosheng Liao Submit-Approved: Jira Key --- drivers/input/touchscreen/himax_v2_mmi/Android.mk | 4 ++++ drivers/input/touchscreen/himax_v2_mmi/Kbuild | 4 ++++ .../input/touchscreen/himax_v2_mmi/himax_inspection.c | 10 +++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/himax_v2_mmi/Android.mk b/drivers/input/touchscreen/himax_v2_mmi/Android.mk index 0e916a51ee8e..fd04d917ee1c 100644 --- a/drivers/input/touchscreen/himax_v2_mmi/Android.mk +++ b/drivers/input/touchscreen/himax_v2_mmi/Android.mk @@ -18,6 +18,10 @@ ifneq ($(BOARD_USES_DOUBLE_TAP),) KERNEL_CFLAGS += CONFIG_INPUT_HIMAX_V2_MMI_ENABLE_DOUBLE_TAP=y endif +ifneq ($(BOARD_USES_HIMAX_MULTI_BIN),) + KERNEL_CFLAGS += CONFIG_INPUT_HIMAX_V2_MMI_ENABLE_MULTI_BIN=y +endif + include $(CLEAR_VARS) LOCAL_MODULE := himax_v2_mmi.ko LOCAL_MODULE_TAGS := optional diff --git a/drivers/input/touchscreen/himax_v2_mmi/Kbuild b/drivers/input/touchscreen/himax_v2_mmi/Kbuild index ef0437cd3116..64e5f682751b 100644 --- a/drivers/input/touchscreen/himax_v2_mmi/Kbuild +++ b/drivers/input/touchscreen/himax_v2_mmi/Kbuild @@ -24,6 +24,10 @@ ifneq ($(filter m y,$(CONFIG_INPUT_HIMAX_V2_MMI_ENABLE_DOUBLE_TAP)),) EXTRA_CFLAGS += -DHIMAX_V2_SENSOR_EN endif +ifneq ($(filter m y,$(CONFIG_INPUT_HIMAX_V2_MMI_ENABLE_MULTI_BIN)),) + EXTRA_CFLAGS += -DHIMAX_V2_MULTI_BIN +endif + obj-m := himax_v2_mmi.o ifneq ($(filter m y,$(CONFIG_INPUT_TOUCHSCREEN_HIMAX_V2_MMI_0FLASH)),) diff --git a/drivers/input/touchscreen/himax_v2_mmi/himax_inspection.c b/drivers/input/touchscreen/himax_v2_mmi/himax_inspection.c index 938856bb0564..619aba95173c 100644 --- a/drivers/input/touchscreen/himax_v2_mmi/himax_inspection.c +++ b/drivers/input/touchscreen/himax_v2_mmi/himax_inspection.c @@ -1858,16 +1858,20 @@ static int himax_chip_self_test(void) uint8_t tmp_addr[DATA_LEN_4] = {0x94, 0x72, 0x00, 0x10}; uint8_t tmp_data[DATA_LEN_4] = {0x01, 0x00, 0x00, 0x00}; -#ifdef HX_CODE_OVERLAY +#ifdef HIMAX_V2_MULTI_BIN uint8_t normalfw[32] = "Himax_firmware.bin"; uint8_t mpapfw[32] = "Himax_mpfw.bin"; + if (private_ts->pdata->panel_supplier) { + snprintf(normalfw, 32, "%s_Himax_firmware.bin", private_ts->pdata->panel_supplier); + snprintf(mpapfw, 32, "%s_Himax_mpfw.bin", private_ts->pdata->panel_supplier); + } #endif I("%s:IN\n", __func__); private_ts->suspend_resume_done = 0; -#ifdef HX_CODE_OVERLAY +#ifdef HIMAX_V2_MULTI_BIN g_core_fp.fp_0f_op_file_dirly(mpapfw); g_core_fp.fp_reload_disable(0); g_core_fp.fp_sense_on(0x00); @@ -2172,7 +2176,7 @@ static int himax_chip_self_test(void) usleep_range(1000, 1001); #endif -#ifdef HX_CODE_OVERLAY +#ifdef HIMAX_V2_MULTI_BIN private_ts->in_self_test = 0; g_core_fp.fp_0f_op_file_dirly(normalfw); hx_turn_on_mp_func(0);