From a376df2ff9a888fb7a4735743b0db5235557070d Mon Sep 17 00:00:00 2001 From: haojl2 Date: Fri, 19 Apr 2019 21:45:29 +0800 Subject: [PATCH] Fix navigation function build issue Only enable FPS_NAVI function if CONFIG_INPUT_EGISTEC_FPS_NAVI defined. if not defined, do not build ets_navi_input.c Change-Id: Ibd57c719cb33ad7254cb77272e4ac5ee7b8b664a Signed-off-by: haojl2 Reviewed-on: https://gerrit.mot.com/1339496 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jianqi Yang Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1367086 --- drivers/input/misc/ets_fps_mmi/Android.mk | 1 + drivers/input/misc/ets_fps_mmi/Kbuild | 9 ++++++--- drivers/input/misc/ets_fps_mmi/ets_fps.c | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/input/misc/ets_fps_mmi/Android.mk b/drivers/input/misc/ets_fps_mmi/Android.mk index cdc8c76ee22c..2b38ac65b946 100644 --- a/drivers/input/misc/ets_fps_mmi/Android.mk +++ b/drivers/input/misc/ets_fps_mmi/Android.mk @@ -8,6 +8,7 @@ ETS_FPS_MMI_MODULE_PATH := $(KERNEL_MODULES_OUT) endif ifeq ($(FPS_NAVI_ENABLE),true) + KERNEL_CFLAGS += CONFIG_INPUT_EGISTEC_FPS_NAVI=y KERNEL_CFLAGS += CONFIG_INPUT_EGISTEC_FPS_NAVI_HORIZON=y KERNEL_CFLAGS += CONFIG_INPUT_EGISTEC_FPS_NAVI_VERTICAL=y endif diff --git a/drivers/input/misc/ets_fps_mmi/Kbuild b/drivers/input/misc/ets_fps_mmi/Kbuild index 06072fd72efe..ed557b5c2a2c 100644 --- a/drivers/input/misc/ets_fps_mmi/Kbuild +++ b/drivers/input/misc/ets_fps_mmi/Kbuild @@ -7,15 +7,18 @@ ifneq ($(filter m y,$(CONFIG_INPUT_EGISTEC_FPS_NAVI_HORIZON)),) EXTRA_CFLAGS += -DCONFIG_INPUT_EGISTEC_FPS_NAVI_HORIZON endif +ets_fps_mmi-y += ets_fps.o + +ifneq ($(filter m y,$(CONFIG_INPUT_EGISTEC_FPS_NAVI)),) + EXTRA_CFLAGS += -DCONFIG_INPUT_EGISTEC_FPS_NAVI + ets_fps_mmi-y += ets_navi_input.o +endif ifneq ($(filter m y,$(CONFIG_INPUT_EGISTEC_FPS_NAVI_VERTICAL)),) EXTRA_CFLAGS += -DCONFIG_INPUT_EGISTEC_FPS_NAVI_VERTICAL endif - ifeq ($(TARGET_BUILD_VARIANT),userdebug) EXTRA_CFLAGS += -DFP_SPI_DEBUG endif -ets_fps_mmi-y += ets_fps.o ets_navi_input.o - obj-m += ets_fps_mmi.o diff --git a/drivers/input/misc/ets_fps_mmi/ets_fps.c b/drivers/input/misc/ets_fps_mmi/ets_fps.c index ecc8f278cae4..aa6e4a8a7bda 100644 --- a/drivers/input/misc/ets_fps_mmi/ets_fps.c +++ b/drivers/input/misc/ets_fps_mmi/ets_fps.c @@ -57,7 +57,11 @@ #define EDGE_TRIGGER_RAISING 0x1 #define LEVEL_TRIGGER_LOW 0x2 #define LEVEL_TRIGGER_HIGH 0x3 +#ifdef CONFIG_INPUT_EGISTEC_FPS_NAVI #define EGIS_NAVI_INPUT 1 /* 1:open ; 0:close */ +#else +#define EGIS_NAVI_INPUT 0 +#endif #ifdef CONFIG_HAS_WAKELOCK static struct wake_lock ets_wake_lock; #else