From c4dc621a76b7fc3a274512b4bfbef267fcb6a068 Mon Sep 17 00:00:00 2001 From: Yan Zhang Date: Tue, 15 Aug 2023 12:09:20 +0800 Subject: [PATCH] Fix touch not work on user build Why: Fix nova touch not work on user build How: Turn off the debug code that uses the API prohibited by GKI build Change-Id: I194b2415b4e44f478e5f2d6afe81bc622c79a6d5 Signed-off-by: Yan Zhang Reviewed-on: https://gerrit.mot.com/2709605 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jun Weng Reviewed-by: Wei Deng Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- drivers/input/touchscreen/nova_0flash_mmi/Kbuild | 4 ++++ .../input/touchscreen/nova_0flash_mmi/nt36xxx_mp_ctrlram.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/nova_0flash_mmi/Kbuild b/drivers/input/touchscreen/nova_0flash_mmi/Kbuild index b47c067739a8..d3938c9e5113 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/Kbuild +++ b/drivers/input/touchscreen/nova_0flash_mmi/Kbuild @@ -26,6 +26,10 @@ ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_DRM_PANEL)),) EXTRA_CFLAGS += -DNVT_CONFIG_DRM_PANEL endif +ifeq ($(TARGET_BUILD_VARIANT),user) + EXTRA_CFLAGS += -DCFG_CTS_FOR_GKI +endif + ifneq ($(filter m y,$(CONFIG_TOUCH_PANEL_NOTIFICATIONS)),) EXTRA_CFLAGS += -DCONFIG_PANEL_NOTIFICATIONS endif diff --git a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mp_ctrlram.c b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mp_ctrlram.c index dec93cb73e94..519f4ecdb2df 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mp_ctrlram.c +++ b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx_mp_ctrlram.c @@ -373,6 +373,7 @@ static void nvt_print_criteria(void) static int32_t nvt_save_rawdata_to_csv(int32_t *rawdata, uint8_t x_ch, uint8_t y_ch, const char *file_path, uint32_t offset) { +#ifndef CFG_CTS_FOR_GKI int32_t x = 0; int32_t y = 0; int32_t iArrayIndex = 0; @@ -479,7 +480,7 @@ static int32_t nvt_save_rawdata_to_csv(int32_t *rawdata, uint8_t x_ch, uint8_t y } printk("%s:--\n", __func__); - +#endif return 0; }