mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
focaltech_v2_mmi: bringup ft3519 on kernel 5.4
- change some compile error for focaltech driver on kernel 5.4 - bringup up ft3519 Change-Id: Id3eac6bdb3047bc33befc86a87b809671367672f Signed-off-by: wangyq13 <wangyq13@lenovo.com> Reviewed-on: https://gerrit.mot.com/1954464 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jun Weng <wengjun1@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
dcbb936232
commit
cb0f2ebc47
5 changed files with 27 additions and 4 deletions
|
|
@ -1,6 +1,12 @@
|
|||
DLKM_DIR := motorola/kernel/modules
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifneq ($(FOCALTECH_TOUCH_IC_NAME),)
|
||||
KERNEL_CFLAGS += CONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME=$(FOCALTECH_TOUCH_IC_NAME)
|
||||
else
|
||||
KERNEL_CFLAGS += CONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME=ft3518u
|
||||
endif
|
||||
|
||||
ifneq ($(BOARD_USES_DOUBLE_TAP),)
|
||||
KERNEL_CFLAGS += CONFIG_INPUT_FOCALTECH_MMI_ENABLE_DOUBLE_TAP=y
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
# add -Wall to try to catch everything we can.
|
||||
EXTRA_CFLAGS += -Wall
|
||||
EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include \
|
||||
-I$(TOP)/motorola/kernel/modules/drivers/input/touchscreen/focaltech_v2_mmi \
|
||||
-I$(TOP)/motorola/kernel/modules/drivers/input/touchscreen/focaltech_v2_mmi/include \
|
||||
-I$(TOP)/motorola/kernel/modules/drivers/input/touchscreen/focaltech_v2_mmi/focaltech_test
|
||||
EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \
|
||||
-I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/focaltech_v2_mmi \
|
||||
-I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/focaltech_v2_mmi/include \
|
||||
-I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/focaltech_v2_mmi/focaltech_test
|
||||
|
||||
obj-m := focaltech_v2_mmi.o
|
||||
focaltech_v2_mmi-objs += focaltech_core.o
|
||||
|
|
@ -16,6 +16,10 @@ focaltech_v2_mmi-objs += focaltech_flash.o
|
|||
focaltech_v2_mmi-objs += focaltech_flash/focaltech_upgrade_ft3518u.o
|
||||
focaltech_v2_mmi-objs += focaltech_i2c.o
|
||||
|
||||
ifneq ($(filter ft3519,$(CONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME)),)
|
||||
EXTRA_CFLAGS += -DCONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME_FT3519
|
||||
endif
|
||||
|
||||
ifneq ($(filter m y,$(CONFIG_INPUT_TOUCHSCREEN_MMI)),)
|
||||
EXTRA_CFLAGS += -DCONFIG_INPUT_TOUCHSCREEN_MMI
|
||||
focaltech_v2_mmi-objs += focaltech_ts_mmi.o
|
||||
|
|
|
|||
|
|
@ -54,7 +54,11 @@
|
|||
#define FTS_CHIP_IDC ((FTS_CHIP_TYPE & FLAGBIT(FLAG_IDC_BIT)) == FLAGBIT(FLAG_IDC_BIT))
|
||||
#define FTS_HID_SUPPORTTED ((FTS_CHIP_TYPE & FLAGBIT(FLAG_HID_BIT)) == FLAGBIT(FLAG_HID_BIT))
|
||||
|
||||
#if defined(CONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME_FT3519)
|
||||
#define FTS_CHIP_TYPE_MAPPING {{0x89, 0x54, 0x52, 0x54, 0x52, 0x00, 0x00, 0x54, 0x5E}}
|
||||
#else
|
||||
#define FTS_CHIP_TYPE_MAPPING {{0x81, 0x54, 0x52, 0x54, 0x52, 0x00, 0x00, 0x54, 0x5C}}
|
||||
#endif
|
||||
|
||||
#define FILE_NAME_LENGTH 128
|
||||
#define ENABLE 1
|
||||
|
|
|
|||
|
|
@ -117,6 +117,8 @@
|
|||
#define _FT5536L 0x5536E481
|
||||
#define _FT3418 0x34180481
|
||||
|
||||
#define _FT3519 0x35190489
|
||||
|
||||
#define _FT5446U 0x5446D083
|
||||
#define _FT5456U 0x5456D083
|
||||
#define _FT3417U 0x3417D083
|
||||
|
|
@ -161,8 +163,13 @@
|
|||
/*
|
||||
* choose your ic chip type of focaltech
|
||||
*/
|
||||
#if defined(CONFIG_INPUT_FOCALTECH_0FLASH_MMI_IC_NAME_FT3519)
|
||||
#define FTS_CHIP_TYPE _FT3519
|
||||
#define FTS_CHIP_NAME "ft3519"
|
||||
#else
|
||||
#define FTS_CHIP_TYPE _FT3518U
|
||||
#define FTS_CHIP_NAME "ft3518u"
|
||||
#endif
|
||||
|
||||
/******************* Enables *********************/
|
||||
/*********** 1 to enable, 0 to disable ***********/
|
||||
|
|
|
|||
|
|
@ -1167,7 +1167,9 @@ static int fts_read_file(char *file_name, u8 **file_buf)
|
|||
old_fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
pos = 0;
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0))
|
||||
ret = vfs_read(filp, *file_buf, file_len , &pos);
|
||||
#endif
|
||||
if (ret < 0)
|
||||
FTS_ERROR("read file fail");
|
||||
FTS_INFO("file len:%d read len:%d pos:%d", (u32)file_len, ret, (u32)pos);
|
||||
|
|
|
|||
Loading…
Reference in a new issue