Browse Source

Merge "touch: enable touch drivers for pitti"

qctecmdr 1 year ago
parent
commit
e38f30ed95
4 changed files with 54 additions and 0 deletions
  1. 28 0
      Android.mk
  2. 20 0
      target.bzl
  3. 3 0
      touch_driver_board.mk
  4. 3 0
      touch_driver_product.mk

+ 28 - 0
Android.mk

@@ -19,6 +19,10 @@ ifeq ($(TOUCH_DLKM_ENABLE),  true)
               LOCAL_MODULE_DDK_BUILD := true
        endif
 
+       ifeq ($(TARGET_BOARD_PLATFORM), pitti)
+              LOCAL_MODULE_DDK_BUILD := true
+       endif
+
        include $(CLEAR_VARS)
 
        # This makefile is only for DLKM
@@ -268,6 +272,30 @@ else ifeq ($(TARGET_BOARD_PLATFORM), trinket)
        include $(DLKM_DIR)/Build_external_kernelmodule.mk
        ###########################################################
 
+else ifeq ($(TARGET_BOARD_PLATFORM), pitti)
+
+       ###########################################################
+       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
+       ###########################################################
+
+       ###########################################################
+       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
+       ###########################################################
+
 else
 
        ###########################################################

+ 20 - 0
target.bzl

@@ -46,9 +46,29 @@ def define_blair(t,v):
         ],
 )
 
+def define_pitti(t,v):
+     define_target_variant_modules(
+        target = t,
+        variant = v,
+        registry = touch_driver_modules,
+        modules = [
+            "focaltech_fts",
+            "goodix_ts"
+        ],
+        config_options = [
+            "TOUCH_DLKM_ENABLE",
+            "CONFIG_ARCH_PITTI",
+            "CONFIG_MSM_TOUCH",
+            "CONFIG_TOUCH_FOCALTECH",
+            "CONFIG_TOUCHSCREEN_GOODIX_BRL"
+        ],
+)
+
 def define_touch_target():
     for (t, v) in get_all_la_variants() + get_all_le_variants() + get_all_lxc_variants():
         if t == "blair":
             define_blair(t, v)
+        elif t == "pitti":
+            define_pitti(t, v)
         else:
             define_pineapple(t, v)

+ 3 - 0
touch_driver_board.mk

@@ -35,6 +35,9 @@ ifeq ($(TOUCH_DLKM_ENABLE),  true)
                                         $(KERNEL_MODULES_OUT)/nt36xxx-i2c.ko
                         else ifeq ($(TARGET_BOARD_PLATFORM), trinket)
                                 BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/synaptics_tcm_ts.ko
+                        else ifeq ($(TARGET_BOARD_PLATFORM), pitti)
+                                BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/focaltech_fts.ko \
+                                        $(KERNEL_MODULES_OUT)/goodix_ts.ko
                         else
                                 BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/nt36xxx-i2c.ko \
                                         $(KERNEL_MODULES_OUT)/goodix_ts.ko \

+ 3 - 0
touch_driver_product.mk

@@ -33,6 +33,9 @@ ifeq ($(TOUCH_DLKM_ENABLE),  true)
                         $(KERNEL_MODULES_OUT)/nt36xxx-i2c.ko
         else ifeq ($(TARGET_BOARD_PLATFORM), trinket)
                 PRODUCT_PACKAGES += $(KERNEL_MODULES_OUT)/synaptics_tcm_ts.ko
+        else ifeq ($(TARGET_BOARD_PLATFORM), pitti)
+                PRODUCT_PACKAGES += $(KERNEL_MODULES_OUT)/focaltech_fts.ko \
+                        $(KERNEL_MODULES_OUT)/goodix_ts.ko
         else
                 PRODUCT_PACKAGES += $(KERNEL_MODULES_OUT)/nt36xxx-i2c.ko \
                         $(KERNEL_MODULES_OUT)/goodix_ts.ko \