Explorar el Código

touch: enable paradetech driver

Enable new paradetech driver.
configuration changes to pick paradetech
driver for compilation.

Change-Id: I70feb9c34857166a8be1e12a3e5d85f4f27bc679
Signed-off-by: Surya Teja Kudiri <[email protected]>
Surya Teja Kudiri hace 2 años
padre
commit
4200da37ac
Se han modificado 7 ficheros con 108 adiciones y 8 borrados
  1. 33 0
      Android.mk
  2. 39 0
      Kbuild
  3. 19 0
      NOTICE
  4. 5 0
      config/gki_monacotouch.conf
  5. 6 0
      config/gki_monacotouchconf.h
  6. 3 4
      touch_driver_board.mk
  7. 3 4
      touch_driver_product.mk

+ 33 - 0
Android.mk

@@ -76,5 +76,38 @@ ifeq ($(TOUCH_DLKM_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_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
+	###########################################################
 	endif # DLKM check
 endif

+ 39 - 0
Kbuild

@@ -19,6 +19,10 @@ endif
 #ifeq ($(CONFIG_ARCH_PINEAPPLE), y)
 	include $(TOUCH_ROOT)/config/gki_pineappletouch.conf
 	LINUX_INC += -include $(TOUCH_ROOT)/config/gki_pineappletouchconf.h
+
+#ifeq ($(CONFIG_ARCH_MONACO), y)
+	include $(TOUCH_ROOT)/config/gki_monacotouch.conf
+	LINUX_INC += -include $(TOUCH_ROOT)/config/gki_monacotouchconf.h
 #endif
 
 LINUX_INC +=	-Iinclude/linux \
@@ -141,4 +145,39 @@ ifeq ($(CONFIG_TOUCHSCREEN_SYNAPTICS_TCM), y)
 
 endif
 
+ifeq ($(CONFIG_TOUCHSCREEN_PARADE), y)
+	LINUX_INC += -include $(TOUCH_ROOT)/pt/pt_regs.h
+	LINUX_INC += -include $(TOUCH_ROOT)/pt/pt_core.h
+	LINUX_INC += -include $(TOUCH_ROOT)/pt/pt_platform.h
+
+	pt_ts-y := \
+		./pt/pt_core.o \
+		./pt/pt_mt_common.o \
+		./pt/pt_platform.o \
+		./pt/pt_devtree.o \
+		./pt/pt_btn.o \
+		./pt/pt_mtb.o \
+		./pt/pt_proximity.o
+
+	obj-$(CONFIG_MSM_TOUCH) += pt_ts.o
+endif
+
+ifeq ($(CONFIG_TOUCHSCREEN_PARADE_I2C), y)
+	LINUX_INC += -include $(TOUCH_ROOT)/pt/pt_regs.h
+
+	pt_i2c-y := \
+		./pt/pt_i2c.o
+
+	obj-$(CONFIG_MSM_TOUCH) += pt_i2c.o
+endif
+
+ifeq ($(CONFIG_TOUCHSCREEN_PARADE_DEVICE_ACCESS), y)
+	LINUX_INC += -include $(TOUCH_ROOT)/pt/pt_regs.h
+
+	pt_device_access-y := \
+		./pt/pt_device_access.o
+
+	obj-$(CONFIG_MSM_TOUCH) += pt_device_access.o
+endif
+
 CDEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\"

+ 19 - 0
NOTICE

@@ -3,6 +3,25 @@
  * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 */
 
+/*
+ *
+ * Parade TouchScreen driver.
+ *
+ * Copyright (C) 2015-2020 Parade Technologies
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2, and only version 2, as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Contact Parade Technologies at www.paradetech.com <[email protected]>
+ */
+
 /*
  *
  * FocalTech fts TouchScreen driver.

+ 5 - 0
config/gki_monacotouch.conf

@@ -0,0 +1,5 @@
+export CONFIG_MSM_TOUCH=m
+export CONFIG_TOUCHSCREEN_PARADE=y
+export CONFIG_TOUCHSCREEN_PARADE_DEVICETREE_SUPPORT=y
+export CONFIG_TOUCHSCREEN_PARADE_I2C=y
+export CONFIG_TOUCHSCREEN_PARADE_DEVICE_ACCESS=y

+ 6 - 0
config/gki_monacotouchconf.h

@@ -0,0 +1,6 @@
+#define CONFIG_TOUCHSCREEN_PARADE 1
+#define CONFIG_TOUCHSCREEN_PARADE_DEVICETREE_SUPPORT 1
+#define CONFIG_TOUCHSCREEN_PARADE_I2C 1
+#define CONFIG_TOUCHSCREEN_PARADE_DEVICE_ACCESS 1
+#define CONFIG_TOUCHSCREEN_PARADE_BUTTON 1
+#define CONFIG_TOUCHSCREEN_PARADE_PROXIMITY 1

+ 3 - 4
touch_driver_board.mk

@@ -8,10 +8,9 @@ endif
 ifeq ($(TOUCH_DLKM_ENABLE),  true)
 	ifneq ($(TARGET_BOARD_AUTO),true)
 		ifeq ($(call is-board-platform-in-list,$(TARGET_BOARD_PLATFORM)),true)
-			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
+			BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/pt_ts.ko \
+				$(KERNEL_MODULES_OUT)/pt_i2c.ko \
+				$(KERNEL_MODULES_OUT)/pt_device_access.ko
 		endif
 	endif
 endif

+ 3 - 4
touch_driver_product.mk

@@ -6,8 +6,7 @@ ifeq ($(TARGET_KERNEL_DLKM_DISABLE), true)
 endif
 
 ifeq ($(TOUCH_DLKM_ENABLE),  true)
-	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
+	PRODUCT_PACKAGES += $(KERNEL_MODULES_OUT)/pt_ts.ko \
+		$(KERNEL_MODULES_OUT)/pt_i2c.ko \
+		$(KERNEL_MODULES_OUT)/pt_device_access.ko
 endif