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);