浏览代码

touch: focal_tech touch driver upgrade

upgrading focal tech touch driver for kernel 5.15 on
kona target.

Change-Id: I21a1216e617d470f64f087f6c5b2b5ac619b2932
Signed-off-by: Surya Teja Kudiri <[email protected]>
Surya Teja Kudiri 2 年之前
父节点
当前提交
d4a3f6dc49
共有 8 个文件被更改,包括 216 次插入170 次删除
  1. 137 118
      Android.mk
  2. 13 8
      Kbuild
  3. 4 0
      config/gki_konatouch.conf
  4. 7 0
      config/gki_konatouchconf.h
  5. 7 4
      focaltech_touch/focaltech_core.c
  6. 2 0
      focaltech_touch/focaltech_core.h
  7. 25 22
      touch_driver_board.mk
  8. 21 18
      touch_driver_product.mk

+ 137 - 118
Android.mk

@@ -2,125 +2,144 @@
 
 TOUCH_DLKM_ENABLE := true
 ifeq ($(TARGET_KERNEL_DLKM_DISABLE), true)
-	ifeq ($(TARGET_KERNEL_DLKM_TOUCH_OVERRIDE), false)
-		TOUCH_DLKM_ENABLE := false
-	endif
+       ifeq ($(TARGET_KERNEL_DLKM_TOUCH_OVERRIDE), false)
+               TOUCH_DLKM_ENABLE := false
+       endif
 endif
 
 ifeq ($(TOUCH_DLKM_ENABLE),  true)
-	TOUCH_SELECT := CONFIG_MSM_TOUCH=m
-
-	LOCAL_PATH := $(call my-dir)
-	include $(CLEAR_VARS)
-
-	# This makefile is only for DLKM
-	ifneq ($(findstring vendor,$(LOCAL_PATH)),)
-
-	ifneq ($(findstring opensource,$(LOCAL_PATH)),)
-		TOUCH_BLD_DIR := $(shell pwd)/vendor/qcom/opensource/touch-drivers
-	endif # opensource
-
-	DLKM_DIR := $(TOP)/device/qcom/common/dlkm
-
-	LOCAL_ADDITIONAL_DEPENDENCIES := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
-
-	# Build
-	###########################################################
-	# This is set once per LOCAL_PATH, not per (kernel) module
-	KBUILD_OPTIONS := TOUCH_ROOT=$(TOUCH_BLD_DIR)
-
-	KBUILD_OPTIONS += MODNAME=touch_dlkm
-	KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
-	KBUILD_OPTIONS += $(TOUCH_SELECT)
-
-	###########################################################
-	include $(CLEAR_VARS)
-	LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
-	LOCAL_MODULE              := nt36xxx-i2c.ko
-	LOCAL_MODULE_KBUILD_NAME  := nt36xxx-i2c.ko
-	LOCAL_MODULE_TAGS         := optional
-	#LOCAL_MODULE_DEBUG_ENABLE := true
-	LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
-	include $(DLKM_DIR)/Build_external_kernelmodule.mk
-	###########################################################
-
-	###########################################################
-	include $(CLEAR_VARS)
-	LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
-	LOCAL_MODULE              := goodix_ts.ko
-	LOCAL_MODULE_KBUILD_NAME  := goodix_ts.ko
-	LOCAL_MODULE_TAGS         := optional
-	#LOCAL_MODULE_DEBUG_ENABLE := true
-	LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
-	include $(DLKM_DIR)/Build_external_kernelmodule.mk
-	###########################################################
-
-	###########################################################
-	include $(CLEAR_VARS)
-	LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
-	LOCAL_MODULE              := atmel_mxt_ts.ko
-	LOCAL_MODULE_KBUILD_NAME  := atmel_mxt_ts.ko
-	LOCAL_MODULE_TAGS         := optional
-	#LOCAL_MODULE_DEBUG_ENABLE := true
-	LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
-	include $(DLKM_DIR)/Build_external_kernelmodule.mk
-	###########################################################
-
-	###########################################################
-	include $(CLEAR_VARS)
-	LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
-	LOCAL_MODULE              := synaptics_tcm_ts.ko
-	LOCAL_MODULE_KBUILD_NAME  := synaptics_tcm_ts.ko
-	LOCAL_MODULE_TAGS         := optional
-	#LOCAL_MODULE_DEBUG_ENABLE := true
-	LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
-	include $(DLKM_DIR)/Build_external_kernelmodule.mk
-	###########################################################
-
-	ifneq ($(TARGET_BOARD_PLATFORM), pineapple)
-		###########################################################
-		include $(CLEAR_VARS)
-		LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
-		LOCAL_MODULE              := pt_ts.ko
-		LOCAL_MODULE_KBUILD_NAME  := pt_ts.ko
-		LOCAL_MODULE_TAGS         := optional
-		#LOCAL_MODULE_DEBUG_ENABLE := true
-		LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
-		include $(DLKM_DIR)/Build_external_kernelmodule.mk
-		###########################################################
-
-		###########################################################
-		include $(CLEAR_VARS)
-		LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
-		LOCAL_MODULE              := pt_i2c.ko
-		LOCAL_MODULE_KBUILD_NAME  := pt_i2c.ko
-		LOCAL_MODULE_TAGS         := optional
-		#LOCAL_MODULE_DEBUG_ENABLE := true
-		LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
-		include $(DLKM_DIR)/Build_external_kernelmodule.mk
-		###########################################################
-
-		###########################################################
-		include $(CLEAR_VARS)
-		LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
-		LOCAL_MODULE              := pt_device_access.ko
-		LOCAL_MODULE_KBUILD_NAME  := pt_device_access.ko
-		LOCAL_MODULE_TAGS         := optional
-		#LOCAL_MODULE_DEBUG_ENABLE := true
-		LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
-		include $(DLKM_DIR)/Build_external_kernelmodule.mk
-		###########################################################
-
-		###########################################################
-		include $(CLEAR_VARS)
-		LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
-		LOCAL_MODULE              := raydium_ts.ko
-		LOCAL_MODULE_KBUILD_NAME  := raydium_ts.ko
-		LOCAL_MODULE_TAGS         := optional
-		#LOCAL_MODULE_DEBUG_ENABLE := true
-		LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
-		include $(DLKM_DIR)/Build_external_kernelmodule.mk
-		###########################################################
-	endif # pineapple
-	endif # DLKM check
+       TOUCH_SELECT := CONFIG_MSM_TOUCH=m
+
+       LOCAL_PATH := $(call my-dir)
+       include $(CLEAR_VARS)
+
+       # This makefile is only for DLKM
+       ifneq ($(findstring vendor,$(LOCAL_PATH)),)
+
+       ifneq ($(findstring opensource,$(LOCAL_PATH)),)
+               TOUCH_BLD_DIR := $(shell pwd)/vendor/qcom/opensource/touch-drivers
+       endif # opensource
+
+       DLKM_DIR := $(TOP)/device/qcom/common/dlkm
+
+       LOCAL_ADDITIONAL_DEPENDENCIES := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
+
+       # Build
+       ###########################################################
+       # This is set once per LOCAL_PATH, not per (kernel) module
+       KBUILD_OPTIONS := TOUCH_ROOT=$(TOUCH_BLD_DIR)
+
+       KBUILD_OPTIONS += MODNAME=touch_dlkm
+       KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM)
+       KBUILD_OPTIONS += $(TOUCH_SELECT)
+
+       ###########################################################
+
+ifeq ($(TARGET_BOARD_PLATFORM), monaco)
+
+       ###########################################################
+       include $(CLEAR_VARS)
+       LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
+       LOCAL_MODULE              := pt_ts.ko
+       LOCAL_MODULE_KBUILD_NAME  := pt_ts.ko
+       LOCAL_MODULE_TAGS         := optional
+       #LOCAL_MODULE_DEBUG_ENABLE := true
+       LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
+       include $(DLKM_DIR)/Build_external_kernelmodule.mk
+       ###########################################################
+
+       ###########################################################
+       include $(CLEAR_VARS)
+       LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
+       LOCAL_MODULE              := pt_i2c.ko
+       LOCAL_MODULE_KBUILD_NAME  := pt_i2c.ko
+       LOCAL_MODULE_TAGS         := optional
+       #LOCAL_MODULE_DEBUG_ENABLE := true
+       LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
+       include $(DLKM_DIR)/Build_external_kernelmodule.mk
+       ###########################################################
+
+       ###########################################################
+       include $(CLEAR_VARS)
+       LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
+       LOCAL_MODULE              := pt_device_access.ko
+       LOCAL_MODULE_KBUILD_NAME  := pt_device_access.ko
+       LOCAL_MODULE_TAGS         := optional
+       #LOCAL_MODULE_DEBUG_ENABLE := true
+       LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
+       include $(DLKM_DIR)/Build_external_kernelmodule.mk
+       ###########################################################
+
+       ###########################################################
+       include $(CLEAR_VARS)
+       LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
+       LOCAL_MODULE              := raydium_ts.ko
+       LOCAL_MODULE_KBUILD_NAME  := raydium_ts.ko
+       LOCAL_MODULE_TAGS         := optional
+       #LOCAL_MODULE_DEBUG_ENABLE := true
+       LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
+       include $(DLKM_DIR)/Build_external_kernelmodule.mk
+       ###########################################################
+
+else ifeq ($(TARGET_BOARD_PLATFORM), kona)
+
+       ###########################################################
+       include $(CLEAR_VARS)
+       LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
+       LOCAL_MODULE              := focaltech_fts.ko
+       LOCAL_MODULE_KBUILD_NAME  := focaltech_fts.ko
+       LOCAL_MODULE_TAGS         := optional
+       #LOCAL_MODULE_DEBUG_ENABLE := true
+       LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
+       include $(DLKM_DIR)/Build_external_kernelmodule.mk
+       ###########################################################
+
+else
+
+       ###########################################################
+       include $(CLEAR_VARS)
+       LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
+       LOCAL_MODULE              := nt36xxx-i2c.ko
+       LOCAL_MODULE_KBUILD_NAME  := nt36xxx-i2c.ko
+       LOCAL_MODULE_TAGS         := optional
+       #LOCAL_MODULE_DEBUG_ENABLE := true
+       LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
+       include $(DLKM_DIR)/Build_external_kernelmodule.mk
+       ###########################################################
+
+       ###########################################################
+       include $(CLEAR_VARS)
+       LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
+       LOCAL_MODULE              := goodix_ts.ko
+       LOCAL_MODULE_KBUILD_NAME  := goodix_ts.ko
+       LOCAL_MODULE_TAGS         := optional
+       #LOCAL_MODULE_DEBUG_ENABLE := true
+       LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
+       include $(DLKM_DIR)/Build_external_kernelmodule.mk
+       ###########################################################
+
+       ###########################################################
+       include $(CLEAR_VARS)
+       LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
+       LOCAL_MODULE              := atmel_mxt_ts.ko
+       LOCAL_MODULE_KBUILD_NAME  := atmel_mxt_ts.ko
+       LOCAL_MODULE_TAGS         := optional
+       #LOCAL_MODULE_DEBUG_ENABLE := true
+       LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
+       include $(DLKM_DIR)/Build_external_kernelmodule.mk
+       ###########################################################
+
+       ###########################################################
+       include $(CLEAR_VARS)
+       LOCAL_SRC_FILES   := $(wildcard $(LOCAL_PATH)/**/*) $(wildcard $(LOCAL_PATH)/*)
+       LOCAL_MODULE              := synaptics_tcm_ts.ko
+       LOCAL_MODULE_KBUILD_NAME  := synaptics_tcm_ts.ko
+       LOCAL_MODULE_TAGS         := optional
+       #LOCAL_MODULE_DEBUG_ENABLE := true
+       LOCAL_MODULE_PATH         := $(KERNEL_MODULES_OUT)
+       include $(DLKM_DIR)/Build_external_kernelmodule.mk
+       ###########################################################
+
+endif #kona
+       endif # DLKM check
 endif

+ 13 - 8
Kbuild

@@ -6,25 +6,30 @@ ifeq ($(CONFIG_ARCH_WAIPIO), y)
 	LINUX_INC += -include $(TOUCH_ROOT)/config/gki_waipiotouchconf.h
 endif
 
-#ifeq ($(CONFIG_ARCH_KALAMA), y)
+ifeq ($(CONFIG_ARCH_KALAMA), y)
 	include $(TOUCH_ROOT)/config/gki_kalamatouch.conf
 	LINUX_INC += -include $(TOUCH_ROOT)/config/gki_kalamatouchconf.h
-#endif
+endif
 
-#ifeq ($(CONFIG_ARCH_KHAJE), y)
+ifeq ($(CONFIG_ARCH_KHAJE), y)
 	include $(TOUCH_ROOT)/config/gki_khajetouch.conf
 	LINUX_INC += -include $(TOUCH_ROOT)/config/gki_khajetouchconf.h
-#endif
+endif
 
-#ifeq ($(CONFIG_ARCH_PINEAPPLE), y)
+ifeq ($(CONFIG_ARCH_PINEAPPLE), y)
 	include $(TOUCH_ROOT)/config/gki_pineappletouch.conf
 	LINUX_INC += -include $(TOUCH_ROOT)/config/gki_pineappletouchconf.h
-#endif
+endif
 
-#ifeq ($(CONFIG_ARCH_MONACO), y)
+ifeq ($(CONFIG_ARCH_MONACO), y)
 	include $(TOUCH_ROOT)/config/gki_monacotouch.conf
 	LINUX_INC += -include $(TOUCH_ROOT)/config/gki_monacotouchconf.h
-#endif
+endif
+
+ifeq ($(CONFIG_ARCH_KONA), y)
+        include $(TOUCH_ROOT)/config/gki_konatouch.conf
+        LINUX_INC += -include $(TOUCH_ROOT)/config/gki_konatouchconf.h
+endif
 
 LINUX_INC +=	-Iinclude/linux \
 		-Iinclude/linux/drm \

+ 4 - 0
config/gki_konatouch.conf

@@ -0,0 +1,4 @@
+export CONFIG_MSM_TOUCH=m
+export CONFIG_TOUCH_FOCALTECH=y
+export CONFIG_TOUCHSCREEN_FTS_DIRECTORY="focaltech_touch"
+export CONFIG_FTS_TRUSTED_TOUCH=n

+ 7 - 0
config/gki_konatouchconf.h

@@ -0,0 +1,7 @@
+/*
+* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+* SPDX-License-Identifier: GPL-2.0-only
+*/
+
+#define CONFIG_TOUCH_FOCALTECH 1
+#define CONFIG_TOUCHSCREEN_FTS_DIRECTORY "focaltech_touch"

+ 7 - 4
focaltech_touch/focaltech_core.c

@@ -998,15 +998,14 @@ static int fts_ts_vm_mem_lend(struct fts_ts_data *fts_data)
 	acl_desc = fts_ts_vm_get_acl(GH_TRUSTED_VM);
 	if (IS_ERR(acl_desc)) {
 		pr_err("Failed to get acl of IO memories for Trusted touch\n");
-		PTR_ERR(acl_desc);
-		return -EINVAL;
+		rc = PTR_ERR(acl_desc);
+		return rc;
 	}
 
 	sgl_desc = fts_ts_vm_get_sgl(fts_data->vm_info);
 	if (IS_ERR(sgl_desc)) {
 		pr_err("Failed to get sgl of IO memories for Trusted touch\n");
-		PTR_ERR(sgl_desc);
-		rc = -EINVAL;
+		rc = PTR_ERR(sgl_desc);
 		goto sgl_error;
 	}
 
@@ -2866,7 +2865,11 @@ static int fts_ts_probe_entry(struct fts_ts_data *ts_data)
 	if (ts_data->ts_workqueue)
 		INIT_WORK(&ts_data->resume_work, fts_resume_work);
 
+#ifdef CONFIG_FTS_TRUSTED_TOUCH
 	if (!strcmp(fts_data->touch_environment, "pvm"))
+#else
+	if (active_panel)
+#endif
 		fts_ts_register_for_panel_events(ts_data->dev->of_node, ts_data);
 #elif defined(CONFIG_FB)
 	if (ts_data->ts_workqueue) {

+ 2 - 0
focaltech_touch/focaltech_core.h

@@ -61,8 +61,10 @@
 #include <linux/sched.h>
 #include <linux/kthread.h>
 #include <linux/dma-mapping.h>
+#if defined(CONFIG_FTS_TRUSTED_TOUCH)
 #include <linux/gunyah/gh_irq_lend.h>
 #include <linux/gunyah/gh_mem_notifier.h>
+#endif
 #include "focaltech_common.h"
 
 /*****************************************************************************

+ 25 - 22
touch_driver_board.mk

@@ -1,28 +1,31 @@
 TOUCH_DLKM_ENABLE := true
 ifeq ($(TARGET_KERNEL_DLKM_DISABLE), true)
-	ifeq ($(TARGET_KERNEL_DLKM_TOUCH_OVERRIDE), false)
-		TOUCH_DLKM_ENABLE := false
-	endif
+        ifeq ($(TARGET_KERNEL_DLKM_TOUCH_OVERRIDE), false)
+                TOUCH_DLKM_ENABLE := false
+        endif
 endif
 
 ifeq ($(TOUCH_DLKM_ENABLE),  true)
-	ifneq ($(TARGET_BOARD_AUTO),true)
-		ifeq ($(call is-board-platform-in-list,$(TARGET_BOARD_PLATFORM)),true)
-			ifeq ($(TARGET_BOARD_PLATFORM), pineapple)
-				BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/nt36xxx-i2c.ko \
-					$(KERNEL_MODULES_OUT)/goodix_ts.ko \
-					$(KERNEL_MODULES_OUT)/atmel_mxt_ts.ko \
-					$(KERNEL_MODULES_OUT)/synaptics_tcm_ts.ko
-			else # pineapple
-				BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/nt36xxx-i2c.ko \
-					$(KERNEL_MODULES_OUT)/goodix_ts.ko \
-					$(KERNEL_MODULES_OUT)/atmel_mxt_ts.ko \
-					$(KERNEL_MODULES_OUT)/synaptics_tcm_ts.ko \
-					$(KERNEL_MODULES_OUT)/pt_ts.ko \
-					$(KERNEL_MODULES_OUT)/pt_i2c.ko \
-					$(KERNEL_MODULES_OUT)/pt_device_access.ko \
-					$(KERNEL_MODULES_OUT)/raydium_ts.ko
-			endif # pineapple
-		endif
-	endif
+        ifneq ($(TARGET_BOARD_AUTO),true)
+                ifeq ($(call is-board-platform-in-list,$(TARGET_BOARD_PLATFORM)),true)
+                       ifeq ($(TARGET_BOARD_PLATFORM), monaco)
+                                BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/pt_ts.ko \
+                                        $(KERNEL_MODULES_OUT)/pt_i2c.ko \
+                                        $(KERNEL_MODULES_OUT)/pt_device_access.ko \
+                                        $(KERNEL_MODULES_OUT)/raydium_ts.ko
+                        else ifeq ($(TARGET_BOARD_PLATFORM), kona)
+                                BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/focaltech_fts.ko
+                        else ifeq ($(TARGET_BOARD_PLATFORM), pineapple)
+                                BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/nt36xxx-i2c.ko \
+                                        $(KERNEL_MODULES_OUT)/goodix_ts.ko \
+                                        $(KERNEL_MODULES_OUT)/atmel_mxt_ts.ko \
+                                        $(KERNEL_MODULES_OUT)/synaptics_tcm_ts.ko
+                        else
+                                BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/nt36xxx-i2c.ko \
+                                        $(KERNEL_MODULES_OUT)/goodix_ts.ko \
+                                        $(KERNEL_MODULES_OUT)/atmel_mxt_ts.ko \
+                                        $(KERNEL_MODULES_OUT)/synaptics_tcm_ts.ko
+                        endif
+                endif
+        endif
 endif

+ 21 - 18
touch_driver_product.mk

@@ -1,24 +1,27 @@
 TOUCH_DLKM_ENABLE := true
 ifeq ($(TARGET_KERNEL_DLKM_DISABLE), true)
-	ifeq ($(TARGET_KERNEL_DLKM_TOUCH_OVERRIDE), false)
-		TOUCH_DLKM_ENABLE := false
-	endif
+        ifeq ($(TARGET_KERNEL_DLKM_TOUCH_OVERRIDE), false)
+                TOUCH_DLKM_ENABLE := false
+        endif
 endif
 
 ifeq ($(TOUCH_DLKM_ENABLE),  true)
-	ifeq ($(TARGET_BOARD_PLATFORM), pineapple)
-		PRODUCT_PACKAGES += $(KERNEL_MODULES_OUT)/nt36xxx-i2c.ko \
-			$(KERNEL_MODULES_OUT)/goodix_ts.ko \
-			$(KERNEL_MODULES_OUT)/atmel_mxt_ts.ko \
-			$(KERNEL_MODULES_OUT)/synaptics_tcm_ts.ko
-	else # pineapple
-		PRODUCT_PACKAGES += $(KERNEL_MODULES_OUT)/nt36xxx-i2c.ko \
-			$(KERNEL_MODULES_OUT)/goodix_ts.ko \
-			$(KERNEL_MODULES_OUT)/atmel_mxt_ts.ko \
-			$(KERNEL_MODULES_OUT)/synaptics_tcm_ts.ko \
-			$(KERNEL_MODULES_OUT)/pt_ts.ko \
-			$(KERNEL_MODULES_OUT)/pt_i2c.ko \
-			$(KERNEL_MODULES_OUT)/pt_device_access.ko \
-			$(KERNEL_MODULES_OUT)/raydium_ts.ko
-	endif # pineapple
+        ifeq ($(TARGET_BOARD_PLATFORM), monaco)
+                PRODUCT_PACKAGES += $(KERNEL_MODULES_OUT)/pt_ts.ko \
+                        $(KERNEL_MODULES_OUT)/pt_i2c.ko \
+                        $(KERNEL_MODULES_OUT)/pt_device_access.ko \
+                        $(KERNEL_MODULES_OUT)/raydium_ts.ko
+        else ifeq ($(TARGET_BOARD_PLATFORM), kona)
+                PRODUCT_PACKAGES += $(KERNEL_MODULES_OUT)/focaltech_fts.ko
+        else ifeq ($(TARGET_BOARD_PLATFORM), pineapple)
+                PRODUCT_PACKAGES += $(KERNEL_MODULES_OUT)/nt36xxx-i2c.ko \
+                        $(KERNEL_MODULES_OUT)/goodix_ts.ko \
+                        $(KERNEL_MODULES_OUT)/atmel_mxt_ts.ko \
+                        $(KERNEL_MODULES_OUT)/synaptics_tcm_ts.ko
+        else
+                PRODUCT_PACKAGES += $(KERNEL_MODULES_OUT)/nt36xxx-i2c.ko \
+                        $(KERNEL_MODULES_OUT)/goodix_ts.ko \
+                        $(KERNEL_MODULES_OUT)/atmel_mxt_ts.ko \
+                        $(KERNEL_MODULES_OUT)/synaptics_tcm_ts.ko
+        endif
 endif