module/input:hawao: add focaltech_v3_mmi for i2c flash

hawao: touch driver bringup support
add focaltech_v3_mmi for i2c flash tp

Change-Id: I727109a2ed4d433448cf56097d20ace1d4bc1658
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2142878
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
hujing3 2021-12-13 22:09:33 +08:00 • committed by Jing Hu
commit 5e9d5773e9
27 changed files with 14859 additions and 0 deletions

View file

@ -0,0 +1,22 @@
DLKM_DIR := motorola/kernel/modules
LOCAL_PATH := $(call my-dir)
ifneq ($(FOCALTECH_TOUCH_IC_NAME),)
KERNEL_CFLAGS += CONFIG_INPUT_FOCALTECH_MMI_IC_NAME=$(FOCALTECH_TOUCH_IC_NAME)
else
KERNEL_CFLAGS += CONFIG_INPUT_FOCALTECH_MMI_IC_NAME=ft3519
endif
ifneq ($(BOARD_USES_DOUBLE_TAP),)
KERNEL_CFLAGS += CONFIG_INPUT_FOCALTECH_MMI_ENABLE_DOUBLE_TAP=y
endif
ifneq ($(FOCALTECH_TOUCH_TEST_SUPPORT),)
KERNEL_CFLAGS += CONFIG_INPUT_FTS_TEST_SUPPORT=y
endif
include $(CLEAR_VARS)
LOCAL_MODULE := focaltech_v3_mmi.ko
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
include $(DLKM_DIR)/AndroidKernelModule.mk

View file

@ -0,0 +1,41 @@
# add -Wall to try to catch everything we can.
EXTRA_CFLAGS += -Wall
EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include \
-I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/focaltech_v3_mmi \
-I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/focaltech_v3_mmi/include
obj-m := focaltech_v3_mmi.o
focaltech_v3_mmi-objs += focaltech_core.o
focaltech_v3_mmi-objs += focaltech_ex_fun.o
focaltech_v3_mmi-objs += focaltech_ex_mode.o
focaltech_v3_mmi-objs += focaltech_gesture.o
focaltech_v3_mmi-objs += focaltech_esdcheck.o
focaltech_v3_mmi-objs += focaltech_point_report_check.o
focaltech_v3_mmi-objs += focaltech_flash.o
focaltech_v3_mmi-objs += focaltech_i2c.o
ifneq ($(filter ft3519,$(CONFIG_INPUT_FOCALTECH_MMI_IC_NAME)),)
EXTRA_CFLAGS += -DCONFIG_FTS_IC_NAME_FT3519
focaltech_v3_mmi-objs += focaltech_flash/focaltech_upgrade_ft5452i.o
endif
ifneq ($(filter ft3518u,$(CONFIG_INPUT_FOCALTECH_MMI_IC_NAME)),)
EXTRA_CFLAGS += -DCONFIG_FTS_IC_NAME_FT3518U
focaltech_v3_mmi-objs += focaltech_flash/focaltech_upgrade_ft3518u.o
endif
ifneq ($(filter m y,$(CONFIG_INPUT_FOCALTECH_MMI_ENABLE_DOUBLE_TAP)),)
EXTRA_CFLAGS += -DFOCALTECH_SENSOR_EN
endif
ifneq ($(filter m y,$(CONFIG_INPUT_FTS_TEST_SUPPORT)),)
EXTRA_CFLAGS += -I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/drivers/input/touchscreen/focaltech_mtk_v2_mmi/focaltech_test
EXTRA_CFLAGS += -DFTS_TEST_SUPPORT
focaltech_mtk_v2_mmi-objs += focaltech_test/focaltech_test.o
focaltech_mtk_v2_mmi-objs += focaltech_test/focaltech_test_ini.o
ifneq ($(filter ft3519,$(CONFIG_INPUT_FTS_MTK_V2_MMI_IC_NAME)),)
focaltech_mtk_v2_mmi-objs += focaltech_test/supported_ic/focaltech_test_ft5452i.o
endif
endif

View file

@ -0,0 +1,10 @@
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
all:
$(MAKE) -C $(KERNEL_SRC) M=$(shell pwd) modules $(KBUILD_OPTIONS)
modules_install:
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(shell pwd) modules_install
clean:
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) clean

View file

@ -0,0 +1,177 @@
/*
*
* FocalTech fts TouchScreen driver.
*
* Copyright (c) 2012-2020, Focaltech Ltd. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
/*****************************************************************************
*
* File Name: focaltech_common.h
*
* Author: Focaltech Driver Team
*
* Created: 2016-08-16
*
* Abstract:
*
* Reference:
*
*****************************************************************************/
#ifndef __LINUX_FOCALTECH_COMMON_H__
#define __LINUX_FOCALTECH_COMMON_H__
#include "focaltech_config.h"
/*****************************************************************************
* Macro definitions using #define
*****************************************************************************/
#define FTS_DRIVER_VERSION "Focaltech V3.3.5 20210514"
#define BYTE_OFF_0(x) (u8)((x) & 0xFF)
#define BYTE_OFF_8(x) (u8)(((x) >> 8) & 0xFF)
#define BYTE_OFF_16(x) (u8)(((x) >> 16) & 0xFF)
#define BYTE_OFF_24(x) (u8)(((x) >> 24) & 0xFF)
#define FLAGBIT(x) (0x00000001 << (x))
#define FLAGBITS(x, y) ((0xFFFFFFFF >> (32 - (y) - 1)) & (0xFFFFFFFF << (x)))
#define FLAG_ICSERIALS_LEN 8
#define FLAG_HID_BIT 10
#define FLAG_IDC_BIT 11
#define IC_SERIALS (FTS_CHIP_TYPE & FLAGBITS(0, FLAG_ICSERIALS_LEN-1))
#define IC_TO_SERIALS(x) ((x) & FLAGBITS(0, FLAG_ICSERIALS_LEN-1))
#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))
#define FTS_MAX_CHIP_IDS 8
#define FTS_CHIP_TYPE_MAPPING {{0x89, 0x54, 0x52, 0x54, 0x52, 0x54, 0x5B, 0x54, 0x5E}}
#define FILE_NAME_LENGTH 128
#define ENABLE 1
#define DISABLE 0
#define VALID 1
#define INVALID 0
#define FTS_CMD_START1 0x55
#define FTS_CMD_START2 0xAA
#define FTS_CMD_START_DELAY 12
#define FTS_CMD_READ_ID 0x90
#define FTS_CMD_READ_ID_LEN 4
#define FTS_CMD_READ_ID_LEN_INCELL 1
#define FTS_CMD_READ_FW_CONF 0xA8
/*register address*/
#define FTS_REG_INT_CNT 0x8F
#define FTS_REG_FLOW_WORK_CNT 0x91
#define FTS_REG_WORKMODE 0x00
#define FTS_REG_WORKMODE_FACTORY_VALUE 0x40
#define FTS_REG_WORKMODE_WORK_VALUE 0x00
#define FTS_REG_ESDCHECK_DISABLE 0x8D
#define FTS_REG_CHIP_ID 0xA3
#define FTS_REG_CHIP_ID2 0x9F
#define FTS_REG_POWER_MODE 0xA5
#define FTS_REG_POWER_MODE_SLEEP 0x03
#define FTS_REG_FW_VER 0xA6
#define FTS_REG_VENDOR_ID 0xA8
#define FTS_REG_LCD_BUSY_NUM 0xAB
#define FTS_REG_FACE_DEC_MODE_EN 0xB0
#define FTS_REG_FACTORY_MODE_DETACH_FLAG 0xB4
#define FTS_REG_FACE_DEC_MODE_STATUS 0x01
#define FTS_REG_IDE_PARA_VER_ID 0xB5
#define FTS_REG_IDE_PARA_STATUS 0xB6
#define FTS_REG_GLOVE_MODE_EN 0xC0
#define FTS_REG_COVER_MODE_EN 0xC1
#define FTS_REG_CHARGER_MODE_EN 0x8B
#define FTS_REG_GESTURE_EN 0xD0
#define FTS_REG_GESTURE_OUTPUT_ADDRESS 0xD3
#define FTS_REG_MODULE_ID 0xE3
#define FTS_REG_LIC_VER 0xE4
#define FTS_REG_ESD_SATURATE 0xED
#define FTS_SYSFS_ECHO_ON(buf) (buf[0] == '1')
#define FTS_SYSFS_ECHO_OFF(buf) (buf[0] == '0')
#define kfree_safe(pbuf) do {\
if (pbuf) {\
kfree(pbuf);\
pbuf = NULL;\
}\
} while(0)
/*****************************************************************************
* Alternative mode (When something goes wrong, the modules may be able to solve the problem.)
*****************************************************************************/
/*
* point report check
* default: disable
*/
#define FTS_POINT_REPORT_CHECK_EN 0
/*****************************************************************************
* Global variable or extern global variabls/functions
*****************************************************************************/
struct ft_chip_t {
u16 type;
u8 chip_idh;
u8 chip_idl;
u8 rom_idh;
u8 rom_idl;
u8 pb_idh;
u8 pb_idl;
u8 bl_idh;
u8 bl_idl;
};
struct ft_chip_id_t {
u16 type;
u16 chip_ids[FTS_MAX_CHIP_IDS];
};
struct ts_ic_info {
bool is_incell;
bool hid_supported;
struct ft_chip_t ids;
struct ft_chip_id_t cid;
};
/*****************************************************************************
* DEBUG function define here
*****************************************************************************/
#if FTS_DEBUG_EN
#define FTS_DEBUG(fmt, args...) do { \
printk("[FTS_TS]%s:"fmt"\n", __func__, ##args); \
} while (0)
#define FTS_FUNC_ENTER() do { \
printk("[FTS_TS]%s: Enter\n", __func__); \
} while (0)
#define FTS_FUNC_EXIT() do { \
printk("[FTS_TS]%s: Exit(%d)\n", __func__, __LINE__); \
} while (0)
#else /* #if FTS_DEBUG_EN*/
#define FTS_DEBUG(fmt, args...)
#define FTS_FUNC_ENTER()
#define FTS_FUNC_EXIT()
#endif
#define FTS_INFO(fmt, args...) do { \
printk(KERN_INFO "[FTS_TS/I]%s:"fmt"\n", __func__, ##args); \
} while (0)
#define FTS_ERROR(fmt, args...) do { \
printk(KERN_ERR "[FTS_TS/E]%s:"fmt"\n", __func__, ##args); \
} while (0)
#endif /* __LINUX_FOCALTECH_COMMON_H__ */

View file

@ -0,0 +1,309 @@
/*
*
* FocalTech TouchScreen driver.
*
* Copyright (c) 2012-2020, FocalTech Systems, Ltd., all rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
/************************************************************************
*
* File Name: focaltech_config.h
*
* Author: Focaltech Driver Team
*
* Created: 2016-08-08
*
* Abstract: global configurations
*
* Version: v1.0
*
************************************************************************/
#ifndef _LINUX_FOCLATECH_CONFIG_H_
#define _LINUX_FOCLATECH_CONFIG_H_
/**************************************************/
/****** G: A, I: B, S: C, U: D ******************/
/****** chip type defines, do not modify *********/
#define _FT8716 0x87160805
#define _FT8736 0x87360806
#define _FT8607 0x86070809
#define _FT8006U 0x8006D80B
#define _FT8006S 0x8006A80B
#define _FT8613 0x8613080C
#define _FT8719 0x8719080D
#define _FT8739 0x8739080E
#define _FT8615 0x8615080F
#define _FT8201 0x82010810
#define _FT8201AA 0x8201A810
#define _FT8006P 0x86220811
#define _FT7251 0x72510812
#define _FT7252 0x72520813
#define _FT8613S 0x8613C814
#define _FT8756 0x87560815
#define _FT8302 0x83020816
#define _FT8009 0x80090817
#define _FT8656 0x86560818
#define _FT8006S_AA 0x86320819
#define _FT7250 0x7250081A
#define _FT7120 0x7120081B
#define _FT8720 0x8720081C
#define _FT8726 0x8726081C
#define _FT8720H 0x8720E81C
#define _FT8720M 0x8720F81C
#define _FT8016 0x8016081D
#define _FT2388 0x2388081E
#define _FT8006S_AB 0x8642081F
#define _FT8722 0x87220820
#define _FT8201AB 0x8201B821
#define _FT8203 0x82030821
#define _FT5416 0x54160402
#define _FT5426 0x54260402
#define _FT5435 0x54350402
#define _FT5436 0x54360402
#define _FT5526 0x55260402
#define _FT5526I 0x5526B402
#define _FT5446 0x54460402
#define _FT5346 0x53460402
#define _FT5446I 0x5446B402
#define _FT5346I 0x5346B402
#define _FT7661 0x76610402
#define _FT7511 0x75110402
#define _FT7421 0x74210402
#define _FT7681 0x76810402
#define _FT3C47U 0x3C47D402
#define _FT3417 0x34170402
#define _FT3517 0x35170402
#define _FT3327 0x33270402
#define _FT3427 0x34270402
#define _FT7311 0x73110402
#define _FT5526_V00 0x5526C402
#define _FT5626 0x56260401
#define _FT5726 0x57260401
#define _FT5826B 0x5826B401
#define _FT5826S 0x5826C401
#define _FT7811 0x78110401
#define _FT3D47 0x3D470401
#define _FT3617 0x36170401
#define _FT3717 0x37170401
#define _FT3817B 0x3817B401
#define _FT3517U 0x3517D401
#define _FT6236U 0x6236D003
#define _FT6336G 0x6336A003
#define _FT6336U 0x6336D003
#define _FT6436U 0x6436D003
#define _FT6436T 0x6436E003
#define _FT3267 0x32670004
#define _FT3367 0x33670004
#define _FT3327G_003 0x3327A482
#define _FT3427_003 0x3427D482
#define _FT3427G_003 0x3427A482
#define _FT5446_003 0x5446D482
#define _FT5446_Q03 0x5446C482
#define _FT5446_P03 0x5446A481
#define _FT5446_N03 0x5446A489
#define _FT5426_003 0x5426D482
#define _FT5526_003 0x5526D482
#define _FT3518 0x35180481
#define _FT3518U 0x3518D481
#define _FT3558 0x35580481
#define _FT3528 0x35280481
#define _FT5536 0x55360481
#define _FT5536L 0x5536E481
#define _FT3418 0x34180481
#define _FT3519 0x35190489
#define _FT5446U 0x5446D083
#define _FT5456U 0x5456D083
#define _FT3417U 0x3417D083
#define _FT5426U 0x5426D083
#define _FT3428 0x34280083
#define _FT3437U 0x3437D083
#define _FT7302 0x73020084
#define _FT7202 0x72020084
#define _FT3308 0x33080084
#define _FT6446 0x64460084
#define _FT6346U 0x6346D085
#define _FT6346G 0x6346A085
#define _FT3067 0x30670085
#define _FT3068 0x30680085
#define _FT3168 0x31680085
#define _FT3268 0x32680085
#define _FT6146 0x61460085
#define _FT5726_003 0x5726D486
#define _FT5726_V03 0x5726C486
#define _FT3618 0x36180487
#define _FT5646 0x56460487
#define _FT3A58 0x3A580487
#define _FT3B58 0x3B580487
#define _FT3D58 0x3D580487
#define _FT5936 0x59360487
#define _FT5A36 0x5A360487
#define _FT5B36 0x5B360487
#define _FT5D36 0x5D360487
#define _FT5946 0x59460487
#define _FT5A46 0x5A460487
#define _FT5B46 0x5B460487
#define _FT5D46 0x5D460487
#define _FT3658U 0x3658D488
#define _FT3658G 0x3658A488
/*************************************************/
/*
* choose your ic chip type of focaltech
*/
#ifdef CONFIG_FTS_IC_NAME_FT3519
#define FTS_CHIP_TYPE _FT3519
#elif defined(CONFIG_FTS_IC_NAME_FT3518U)
#define FTS_CHIP_TYPE _FT3518U
#else
#define FTS_CHIP_TYPE _FT3519
#endif
/******************* Enables *********************/
/*********** 1 to enable, 0 to disable ***********/
/*
* show debug log info
* enable it for debug, disable it for release
*/
#define FTS_DEBUG_EN 1
/*
* Linux MultiTouch Protocol
* 1: Protocol B(default), 0: Protocol A
*/
#define FTS_MT_PROTOCOL_B_EN 1
/*
* Report Pressure in multitouch
* 1:enable(default),0:disable
*/
#define FTS_REPORT_PRESSURE_EN 1
/*
* Stylus PEN enable
* 1:enable(default),0:disable
*/
#define FTS_PEN_EN 0
/*
* Gesture function enable
* default: disable
*/
#define FTS_GESTURE_EN 0
/*
* ESD check & protection
* default: disable
*/
#define FTS_ESDCHECK_EN 0
/*
* Production test enable
* 1: enable, 0:disable(default)
*/
#ifdef FTS_TEST_SUPPORT
#define FTS_TEST_EN 1
#else
#define FTS_TEST_EN 0
#endif
/*
* Pinctrl enable
* default: disable
*/
#define FTS_PINCTRL_EN 0
/*
* Customer power enable
* enable it when customer need control TP power
* default: disable
*/
#define FTS_POWER_SOURCE_CUST_EN 1
/****************************************************/
/********************** Upgrade ****************************/
/*
* auto upgrade
*/
#define FTS_AUTO_UPGRADE_EN 0
/*
* auto upgrade for lcd cfg
*/
#define FTS_AUTO_LIC_UPGRADE_EN 0
/*
* Numbers of modules support
*/
#define FTS_GET_MODULE_NUM 0
/*
* module_id: mean vendor_id generally, also maybe gpio or lcm_id...
* If means vendor_id, the FTS_MODULE_ID = PANEL_ID << 8 + VENDOR_ID
* FTS_GET_MODULE_NUM == 0/1, no check module id, you may ignore them
* FTS_GET_MODULE_NUM >= 2, compatible with FTS_MODULE2_ID
* FTS_GET_MODULE_NUM >= 3, compatible with FTS_MODULE3_ID
*/
#define FTS_MODULE_ID 0x0000
#define FTS_MODULE2_ID 0x0000
#define FTS_MODULE3_ID 0x0000
/*
* Need set the following when get firmware via firmware_request()
* For example: if module'vendor is tianma,
* #define FTS_MODULE_NAME "tianma"
* then file_name will be "focaltech_ts_fw_tianma"
* You should rename fw to "focaltech_ts_fw_tianma", and push it into
* etc/firmware or by customers
*/
#define FTS_MODULE_NAME ""
#define FTS_MODULE2_NAME ""
#define FTS_MODULE3_NAME ""
/*
* FW.i file for auto upgrade, you must replace it with your own
* define your own fw_file, the sample one to be replaced is invalid
* NOTE: if FTS_GET_MODULE_NUM > 1, it's the fw corresponding with FTS_VENDOR_ID
*/
#define FTS_UPGRADE_FW_FILE "include/firmware/fw_sample.i"
/*
* if FTS_GET_MODULE_NUM >= 2, fw corrsponding with FTS_VENDOR_ID2
* define your own fw_file, the sample one is invalid
*/
#define FTS_UPGRADE_FW2_FILE "include/firmware/fw_sample.i"
/*
* if FTS_GET_MODULE_NUM >= 3, fw corrsponding with FTS_VENDOR_ID3
* define your own fw_file, the sample one is invalid
*/
#define FTS_UPGRADE_FW3_FILE "include/firmware/fw_sample.i"
/*********************************************************/
#endif /* _LINUX_FOCLATECH_CONFIG_H_ */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,308 @@
/*
*
* FocalTech TouchScreen driver.
*
* Copyright (c) 2012-2020, Focaltech Ltd. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
/*****************************************************************************
*
* File Name: focaltech_core.h
* Author: Focaltech Driver Team
*
* Created: 2016-08-08
*
* Abstract:
*
* Reference:
*
*****************************************************************************/
#ifndef __LINUX_FOCALTECH_CORE_H__
#define __LINUX_FOCALTECH_CORE_H__
/*****************************************************************************
* Included header files
*****************************************************************************/
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/spi/spi.h>
#include <linux/input.h>
#include <linux/input/mt.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/gpio.h>
#include <linux/regulator/consumer.h>
#include <linux/uaccess.h>
#include <linux/firmware.h>
#include <linux/debugfs.h>
#include <linux/mutex.h>
#include <linux/workqueue.h>
#include <linux/wait.h>
#include <linux/time.h>
#include <linux/jiffies.h>
#include <linux/fs.h>
#include <linux/proc_fs.h>
#include <linux/version.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/kthread.h>
#include <linux/dma-mapping.h>
#include "focaltech_common.h"
/*****************************************************************************
* Private constant and macro definitions using #define
*****************************************************************************/
#define FTS_MAX_POINTS_SUPPORT 10 /* constant value, can't be changed */
#define FTS_MAX_KEYS 4
#define FTS_KEY_DIM 10
#define FTS_ONE_TCH_LEN 6
#define FTS_TOUCH_DATA_LEN (FTS_MAX_POINTS_SUPPORT * FTS_ONE_TCH_LEN + 3)
#define FTS_GESTURE_POINTS_MAX 6
#define FTS_GESTURE_DATA_LEN (FTS_GESTURE_POINTS_MAX * 4 + 4)
#define FTS_MAX_ID 0x0A
#define FTS_TOUCH_X_H_POS 3
#define FTS_TOUCH_X_L_POS 4
#define FTS_TOUCH_Y_H_POS 5
#define FTS_TOUCH_Y_L_POS 6
#define FTS_TOUCH_PRE_POS 7
#define FTS_TOUCH_AREA_POS 8
#define FTS_TOUCH_POINT_NUM 2
#define FTS_TOUCH_EVENT_POS 3
#define FTS_TOUCH_ID_POS 5
#define FTS_COORDS_ARR_SIZE 4
#define FTS_X_MIN_DISPLAY_DEFAULT 0
#define FTS_Y_MIN_DISPLAY_DEFAULT 0
#define FTS_X_MAX_DISPLAY_DEFAULT 720
#define FTS_Y_MAX_DISPLAY_DEFAULT 1280
#define FTS_TOUCH_DOWN 0
#define FTS_TOUCH_UP 1
#define FTS_TOUCH_CONTACT 2
#define EVENT_DOWN(flag) ((FTS_TOUCH_DOWN == flag) || (FTS_TOUCH_CONTACT == flag))
#define EVENT_UP(flag) (FTS_TOUCH_UP == flag)
#define EVENT_NO_DOWN(data) (!data->point_num)
#define FTS_MAX_COMPATIBLE_TYPE 4
#define FTS_MAX_COMMMAND_LENGTH 16
/*****************************************************************************
* Alternative mode (When something goes wrong, the modules may be able to solve the problem.)
*****************************************************************************/
/*
* For commnication error in PM(deep sleep) state
*/
#define FTS_PATCH_COMERR_PM 0
#define FTS_TIMEOUT_COMERR_PM 700
#define FTS_HIGH_REPORT 0
#define FTS_SIZE_DEFAULT 15
/*****************************************************************************
* Private enumerations, structures and unions using typedef
*****************************************************************************/
struct ftxxxx_proc {
struct proc_dir_entry *proc_entry;
u8 opmode;
u8 cmd_len;
u8 cmd[FTS_MAX_COMMMAND_LENGTH];
};
struct fts_ts_platform_data {
u32 irq_gpio;
u32 irq_gpio_flags;
u32 reset_gpio;
u32 reset_gpio_flags;
bool have_key;
u32 key_number;
u32 keys[FTS_MAX_KEYS];
u32 key_y_coords[FTS_MAX_KEYS];
u32 key_x_coords[FTS_MAX_KEYS];
u32 x_max;
u32 y_max;
u32 x_min;
u32 y_min;
u32 max_touch_number;
};
struct ts_event {
int x; /*x coordinate */
int y; /*y coordinate */
int p; /* pressure */
int flag; /* touch event flag: 0 -- down; 1-- up; 2 -- contact */
int id; /*touch ID */
int area;
};
struct pen_event {
int inrange;
int tip;
int x; /*x coordinate */
int y; /*y coordinate */
int p; /* pressure */
int flag; /* touch event flag: 0 -- down; 1-- up; 2 -- contact */
int id; /*touch ID */
int tilt_x;
int tilt_y;
int tool_type;
};
struct fts_ts_data {
struct i2c_client *client;
struct spi_device *spi;
struct device *dev;
struct input_dev *input_dev;
struct input_dev *pen_dev;
struct fts_ts_platform_data *pdata;
struct ts_ic_info ic_info;
struct workqueue_struct *ts_workqueue;
struct work_struct fwupg_work;
struct delayed_work esdcheck_work;
struct delayed_work prc_work;
struct work_struct resume_work;
struct ftxxxx_proc proc;
spinlock_t irq_lock;
struct mutex report_mutex;
struct mutex bus_lock;
unsigned long intr_jiffies;
int irq;
int log_level;
int fw_is_running; /* confirm fw is running when using spi:default 0 */
int dummy_byte;
#if defined(CONFIG_PM) && FTS_PATCH_COMERR_PM
struct completion pm_completion;
bool pm_suspend;
#endif
bool suspended;
bool fw_loading;
bool irq_disabled;
bool power_disabled;
bool glove_mode;
bool cover_mode;
bool charger_mode;
bool gesture_mode; /* gesture enable or disable, default: disable */
bool prc_mode;
struct pen_event pevent;
/* multi-touch */
struct ts_event *events;
u8 *bus_tx_buf;
u8 *bus_rx_buf;
int bus_type;
u8 *point_buf;
int pnt_buf_size;
int touchs;
int key_state;
int touch_point;
int point_num;
struct regulator *vdd;
struct regulator *vcc_i2c;
#if FTS_PINCTRL_EN
struct pinctrl *pinctrl;
struct pinctrl_state *pins_active;
struct pinctrl_state *pins_suspend;
struct pinctrl_state *pins_release;
#endif
#if defined(CONFIG_FB) || defined(CONFIG_DRM)
struct notifier_block fb_notif;
#elif defined(CONFIG_HAS_EARLYSUSPEND)
struct early_suspend early_suspend;
#endif
};
enum _FTS_BUS_TYPE {
BUS_TYPE_NONE,
BUS_TYPE_I2C,
BUS_TYPE_SPI,
BUS_TYPE_SPI_V2,
};
/*****************************************************************************
* Global variable or extern global variabls/functions
*****************************************************************************/
extern struct fts_ts_data *fts_data;
/* communication interface */
int fts_read(u8 *cmd, u32 cmdlen, u8 *data, u32 datalen);
int fts_read_reg(u8 addr, u8 *value);
int fts_write(u8 *writebuf, u32 writelen);
int fts_write_reg(u8 addr, u8 value);
void fts_hid2std(void);
int fts_bus_init(struct fts_ts_data *ts_data);
int fts_bus_exit(struct fts_ts_data *ts_data);
/* Gesture functions */
int fts_gesture_init(struct fts_ts_data *ts_data);
int fts_gesture_exit(struct fts_ts_data *ts_data);
void fts_gesture_recovery(struct fts_ts_data *ts_data);
int fts_gesture_readdata(struct fts_ts_data *ts_data, u8 *data);
int fts_gesture_suspend(struct fts_ts_data *ts_data);
int fts_gesture_resume(struct fts_ts_data *ts_data);
/* Apk and functions */
int fts_create_apk_debug_channel(struct fts_ts_data *);
void fts_release_apk_debug_channel(struct fts_ts_data *);
/* ADB functions */
int fts_create_sysfs(struct fts_ts_data *ts_data);
int fts_remove_sysfs(struct fts_ts_data *ts_data);
/* ESD */
#if FTS_ESDCHECK_EN
int fts_esdcheck_init(struct fts_ts_data *ts_data);
int fts_esdcheck_exit(struct fts_ts_data *ts_data);
int fts_esdcheck_switch(bool enable);
int fts_esdcheck_proc_busy(bool proc_debug);
int fts_esdcheck_set_intr(bool intr);
int fts_esdcheck_suspend(void);
int fts_esdcheck_resume(void);
#endif
/* Production test */
#if FTS_TEST_EN
int fts_test_init(struct fts_ts_data *ts_data);
int fts_test_exit(struct fts_ts_data *ts_data);
#endif
/* Point Report Check*/
#if FTS_POINT_REPORT_CHECK_EN
int fts_point_report_check_init(struct fts_ts_data *ts_data);
int fts_point_report_check_exit(struct fts_ts_data *ts_data);
void fts_prc_queue_work(struct fts_ts_data *ts_data);
#endif
/* FW upgrade */
int fts_fwupg_init(struct fts_ts_data *ts_data);
int fts_fwupg_exit(struct fts_ts_data *ts_data);
int fts_upgrade_bin(char *fw_name, bool force);
int fts_enter_test_environment(bool test_state);
/* Other */
int fts_reset_proc(int hdelayms);
int fts_check_cid(struct fts_ts_data *ts_data, u8 id_h);
int fts_wait_tp_to_valid(void);
void fts_release_all_finger(void);
void fts_tp_state_recovery(struct fts_ts_data *ts_data);
int fts_ex_mode_init(struct fts_ts_data *ts_data);
int fts_ex_mode_exit(struct fts_ts_data *ts_data);
int fts_ex_mode_recovery(struct fts_ts_data *ts_data);
void fts_irq_disable(void);
void fts_irq_enable(void);
#endif /* __LINUX_FOCALTECH_CORE_H__ */

View file

@ -0,0 +1,462 @@
/*
*
* FocalTech TouchScreen driver.
*
* Copyright (c) 2012-2020, FocalTech Systems, Ltd., all rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
/*****************************************************************************
*
* File Name: focaltech_esdcheck.c
*
* Author: Focaltech Driver Team
*
* Created: 2016-08-03
*
* Abstract: ESD check function
*
* Version: v1.0
*
* Revision History:
* v1.0:
* First release. By luougojin 2016-08-03
* v1.1: By luougojin 2017-02-15
* 1. Add LCD_ESD_PATCH to control idc_esdcheck_lcderror
*****************************************************************************/
/*****************************************************************************
* Included header files
*****************************************************************************/
#include "focaltech_core.h"
#if FTS_ESDCHECK_EN
/*****************************************************************************
* Private constant and macro definitions using #define
*****************************************************************************/
#define ESDCHECK_WAIT_TIME 1000 /* ms */
#define LCD_ESD_PATCH 0
#define ESDCHECK_INTRCNT_MAX 2
/*****************************************************************************
* Private enumerations, structures and unions using typedef
*****************************************************************************/
struct fts_esdcheck_st {
u8 mode : 1; /* 1- need check esd 0- no esd check */
u8 suspend : 1;
u8 proc_debug : 1; /* apk or adb use */
u8 intr : 1; /* 1- Interrupt trigger */
u8 unused : 4;
u8 intr_cnt;
u8 flow_work_hold_cnt; /* Flow Work Cnt(reg0x91) keep a same value for x times. >=5 times is ESD, need reset */
u8 flow_work_cnt_last; /* Save Flow Work Cnt(reg0x91) value */
u32 hardware_reset_cnt;
u32 nack_cnt;
u32 dataerror_cnt;
};
/*****************************************************************************
* Static variables
*****************************************************************************/
static struct fts_esdcheck_st fts_esdcheck_data;
/*****************************************************************************
* Global variable or extern global variabls/functions
*****************************************************************************/
/*****************************************************************************
* Static function prototypes
*****************************************************************************/
/*****************************************************************************
* functions body
*****************************************************************************/
#if LCD_ESD_PATCH
int lcd_need_reset;
static int tp_need_recovery; /* LCD reset cause Tp reset */
int idc_esdcheck_lcderror(struct fts_ts_data *ts_data)
{
int ret = 0;
u8 val = 0;
FTS_DEBUG("check LCD ESD");
if ( (tp_need_recovery == 1) && (lcd_need_reset == 0) ) {
tp_need_recovery = 0;
/* LCD reset, need recover TP state */
fts_release_all_finger();
fts_tp_state_recovery(ts_data);
}
ret = fts_read_reg(FTS_REG_ESD_SATURATE, &val);
if ( ret < 0) {
FTS_ERROR("read reg0xED fail,ret:%d", ret);
return -EIO;
}
if (val == 0xAA) {
/*
* 1. Set flag lcd_need_reset = 1;
* 2. LCD driver need reset(recovery) LCD and set lcd_need_reset to 0
* 3. recover TP state
*/
FTS_INFO("LCD ESD, need execute LCD reset");
lcd_need_reset = 1;
tp_need_recovery = 1;
}
return 0;
}
#endif
static int fts_esdcheck_tp_reset(struct fts_ts_data *ts_data)
{
FTS_FUNC_ENTER();
fts_esdcheck_data.flow_work_hold_cnt = 0;
fts_esdcheck_data.hardware_reset_cnt++;
fts_reset_proc(200);
fts_release_all_finger();
fts_tp_state_recovery(ts_data);
FTS_FUNC_EXIT();
return 0;
}
static bool get_chip_id(struct fts_ts_data *ts_data)
{
int ret = 0;
int i = 0;
u8 idh = 0;
u8 chip_id = ts_data->ic_info.ids.chip_idh;
for (i = 0; i < 3; i++) {
ret = fts_read_reg(FTS_REG_CHIP_ID, &idh);
if (ret < 0) {
FTS_ERROR("read chip id fail,ret:%d", ret);
fts_esdcheck_data.nack_cnt++;
} else {
if ((idh == chip_id) || (fts_check_cid(ts_data, idh) == 0)) {
break;
} else {
FTS_DEBUG("read chip_id:%x,retry:%d", idh, i);
fts_esdcheck_data.dataerror_cnt++;
}
}
msleep(10);
}
/* if can't get correct data in 3 times, then need hardware reset */
if (i >= 3) {
FTS_ERROR("read chip id 3 times fail, need execute TP reset");
return true;
}
return false;
}
/*****************************************************************************
* Name: get_flow_cnt
* Brief: Read flow cnt(0x91)
* Input:
* Output:
* Return: 1(true) - Reg 0x91(flow cnt) abnormal: hold a value for 5 times
* 0(false) - Reg 0x91(flow cnt) normal
*****************************************************************************/
static bool get_flow_cnt(struct fts_ts_data *ts_data)
{
int ret = 0;
u8 reg_value = 0;
u8 reg_addr = 0;
reg_addr = FTS_REG_FLOW_WORK_CNT;
ret = fts_read(&reg_addr, 1, &reg_value, 1);
if (ret < 0) {
FTS_ERROR("read reg0x91 fail,ret:%d", ret);
fts_esdcheck_data.nack_cnt++;
} else {
if ( reg_value == fts_esdcheck_data.flow_work_cnt_last ) {
FTS_DEBUG("reg0x91,val:%x,last:%x", reg_value,
fts_esdcheck_data.flow_work_cnt_last);
fts_esdcheck_data.flow_work_hold_cnt++;
} else {
fts_esdcheck_data.flow_work_hold_cnt = 0;
}
fts_esdcheck_data.flow_work_cnt_last = reg_value;
}
/* Flow Work Cnt keep a value for 5 times, need execute TP reset */
if (fts_esdcheck_data.flow_work_hold_cnt >= 5) {
FTS_DEBUG("reg0x91 keep a value for 5 times, need execute TP reset");
return true;
}
return false;
}
static int esdcheck_algorithm(struct fts_ts_data *ts_data)
{
int ret = 0;
u8 reg_value = 0;
u8 reg_addr = 0;
bool hardware_reset = 0;
/* 1. esdcheck is interrupt, then return */
if (fts_esdcheck_data.intr == 1) {
fts_esdcheck_data.intr_cnt++;
if (fts_esdcheck_data.intr_cnt > ESDCHECK_INTRCNT_MAX)
fts_esdcheck_data.intr = 0;
else
return 0;
}
/* 2. check power state, if suspend, no need check esd */
if (fts_esdcheck_data.suspend == 1) {
FTS_DEBUG("In suspend, not check esd");
/* because in suspend state, adb can be used, when upgrade FW, will
* active ESD check(active = 1); But in suspend, then will don't
* queue_delayed_work, when resume, don't check ESD again
*/
return 0;
}
/* 3. check fts_esdcheck_data.proc_debug state, if 1-proc busy, no need check esd*/
if (fts_esdcheck_data.proc_debug == 1) {
FTS_INFO("In apk/adb command mode, not check esd");
return 0;
}
/* 4. In factory mode, can't check esd */
reg_addr = FTS_REG_WORKMODE;
ret = fts_read_reg(reg_addr, &reg_value);
if ( ret < 0 ) {
fts_esdcheck_data.nack_cnt++;
} else if ( (reg_value & 0x70) != FTS_REG_WORKMODE_WORK_VALUE) {
FTS_DEBUG("not in work mode(%x), no check esd", reg_value);
return 0;
}
/* 5. IDC esd check lcd default:close */
#if LCD_ESD_PATCH
idc_esdcheck_lcderror(ts_data);
#endif
/* 6. Get Chip ID */
hardware_reset = get_chip_id(ts_data);
/* 7. get Flow work cnt: 0x91 If no change for 5 times, then ESD and reset */
if (!hardware_reset) {
hardware_reset = get_flow_cnt(ts_data);
}
/* 8. If need hardware reset, then handle it here */
if (hardware_reset == 1) {
FTS_DEBUG("NoACK=%d, Error Data=%d, Hardware Reset=%d",
fts_esdcheck_data.nack_cnt,
fts_esdcheck_data.dataerror_cnt,
fts_esdcheck_data.hardware_reset_cnt);
fts_esdcheck_tp_reset(ts_data);
}
return 0;
}
static void esdcheck_func(struct work_struct *work)
{
struct fts_ts_data *ts_data = container_of(work,
struct fts_ts_data, esdcheck_work.work);
if (ENABLE == fts_esdcheck_data.mode) {
esdcheck_algorithm(ts_data);
queue_delayed_work(ts_data->ts_workqueue, &ts_data->esdcheck_work,
msecs_to_jiffies(ESDCHECK_WAIT_TIME));
}
}
int fts_esdcheck_set_intr(bool intr)
{
/* interrupt don't add debug message */
fts_esdcheck_data.intr = intr;
fts_esdcheck_data.intr_cnt = (u8)intr;
return 0;
}
static int fts_esdcheck_get_status(void)
{
/* interrupt don't add debug message */
return fts_esdcheck_data.mode;
}
/*****************************************************************************
* Name: fts_esdcheck_proc_busy
* Brief: When APK or ADB command access TP via driver, then need set proc_debug,
* then will not check ESD.
* Input:
* Output:
* Return:
*****************************************************************************/
int fts_esdcheck_proc_busy(bool proc_debug)
{
fts_esdcheck_data.proc_debug = proc_debug;
return 0;
}
/*****************************************************************************
* Name: fts_esdcheck_switch
* Brief: FTS esd check function switch.
* Input: enable: 1 - Enable esd check
* 0 - Disable esd check
* Output:
* Return:
*****************************************************************************/
int fts_esdcheck_switch(bool enable)
{
struct fts_ts_data *ts_data = fts_data;
FTS_FUNC_ENTER();
if (fts_esdcheck_data.mode == ENABLE) {
if (enable) {
FTS_DEBUG("ESD check start");
fts_esdcheck_data.flow_work_hold_cnt = 0;
fts_esdcheck_data.flow_work_cnt_last = 0;
fts_esdcheck_data.intr = 0;
fts_esdcheck_data.intr_cnt = 0;
queue_delayed_work(ts_data->ts_workqueue,
&ts_data->esdcheck_work,
msecs_to_jiffies(ESDCHECK_WAIT_TIME));
} else {
FTS_DEBUG("ESD check stop");
cancel_delayed_work_sync(&ts_data->esdcheck_work);
}
}
FTS_FUNC_EXIT();
return 0;
}
int fts_esdcheck_suspend(void)
{
FTS_FUNC_ENTER();
fts_esdcheck_switch(DISABLE);
fts_esdcheck_data.suspend = 1;
fts_esdcheck_data.intr = 0;
fts_esdcheck_data.intr_cnt = 0;
FTS_FUNC_EXIT();
return 0;
}
int fts_esdcheck_resume( void )
{
FTS_FUNC_ENTER();
fts_esdcheck_switch(ENABLE);
fts_esdcheck_data.suspend = 0;
fts_esdcheck_data.intr = 0;
fts_esdcheck_data.intr_cnt = 0;
FTS_FUNC_EXIT();
return 0;
}
static ssize_t fts_esdcheck_store(
struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
struct input_dev *input_dev = fts_data->input_dev;
mutex_lock(&input_dev->mutex);
if (FTS_SYSFS_ECHO_ON(buf)) {
FTS_DEBUG("enable esdcheck");
fts_esdcheck_data.mode = ENABLE;
fts_esdcheck_switch(ENABLE);
} else if (FTS_SYSFS_ECHO_OFF(buf)) {
FTS_DEBUG("disable esdcheck");
fts_esdcheck_switch(DISABLE);
fts_esdcheck_data.mode = DISABLE;
}
mutex_unlock(&input_dev->mutex);
return count;
}
static ssize_t fts_esdcheck_show(
struct device *dev, struct device_attribute *attr, char *buf)
{
int count;
struct input_dev *input_dev = fts_data->input_dev;
mutex_lock(&input_dev->mutex);
count = snprintf(buf, PAGE_SIZE, "Esd check: %s\n", \
fts_esdcheck_get_status() ? "On" : "Off");
mutex_unlock(&input_dev->mutex);
return count;
}
/* sysfs esd node
* read example: cat fts_esd_mode ---read esd mode
* write example:echo 01 > fts_esd_mode ---make esdcheck enable
*
*/
static DEVICE_ATTR (fts_esd_mode, S_IRUGO | S_IWUSR, fts_esdcheck_show, fts_esdcheck_store);
static struct attribute *fts_esd_mode_attrs[] = {
&dev_attr_fts_esd_mode.attr,
NULL,
};
static struct attribute_group fts_esd_group = {
.attrs = fts_esd_mode_attrs,
};
int fts_create_esd_sysfs(struct device *dev)
{
int ret = 0;
ret = sysfs_create_group(&dev->kobj, &fts_esd_group);
if ( ret != 0) {
FTS_ERROR("fts_create_esd_sysfs(sysfs) create fail");
sysfs_remove_group(&dev->kobj, &fts_esd_group);
return ret;
}
return 0;
}
int fts_esdcheck_init(struct fts_ts_data *ts_data)
{
FTS_FUNC_ENTER();
if (ts_data->ts_workqueue) {
INIT_DELAYED_WORK(&ts_data->esdcheck_work, esdcheck_func);
} else {
FTS_ERROR("fts workqueue is NULL, can't run esd check function");
return -EINVAL;
}
memset((u8 *)&fts_esdcheck_data, 0, sizeof(struct fts_esdcheck_st));
fts_esdcheck_data.mode = ENABLE;
fts_esdcheck_data.intr = 0;
fts_esdcheck_data.intr_cnt = 0;
fts_esdcheck_switch(ENABLE);
fts_create_esd_sysfs(ts_data->dev);
FTS_FUNC_EXIT();
return 0;
}
int fts_esdcheck_exit(struct fts_ts_data *ts_data)
{
sysfs_remove_group(&ts_data->dev->kobj, &fts_esd_group);
return 0;
}
#endif /* FTS_ESDCHECK_EN */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,307 @@
/*
*
* FocalTech ftxxxx TouchScreen driver.
*
* Copyright (c) 2012-2020, Focaltech Ltd. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
/*****************************************************************************
*
* File Name: focaltech_ex_mode.c
*
* Author: Focaltech Driver Team
*
* Created: 2016-08-31
*
* Abstract:
*
* Reference:
*
*****************************************************************************/
/*****************************************************************************
* 1.Included header files
*****************************************************************************/
#include "focaltech_core.h"
/*****************************************************************************
* 2.Private constant and macro definitions using #define
*****************************************************************************/
/*****************************************************************************
* 3.Private enumerations, structures and unions using typedef
*****************************************************************************/
enum _ex_mode {
MODE_GLOVE = 0,
MODE_COVER,
MODE_CHARGER,
};
/*****************************************************************************
* 4.Static variables
*****************************************************************************/
/*****************************************************************************
* 5.Global variable or extern global variabls/functions
*****************************************************************************/
/*****************************************************************************
* 6.Static function prototypes
*******************************************************************************/
static int fts_ex_mode_switch(enum _ex_mode mode, u8 value)
{
int ret = 0;
u8 m_val = 0;
if (value)
m_val = 0x01;
else
m_val = 0x00;
switch (mode) {
case MODE_GLOVE:
ret = fts_write_reg(FTS_REG_GLOVE_MODE_EN, m_val);
if (ret < 0) {
FTS_ERROR("MODE_GLOVE switch to %d fail", m_val);
}
break;
case MODE_COVER:
ret = fts_write_reg(FTS_REG_COVER_MODE_EN, m_val);
if (ret < 0) {
FTS_ERROR("MODE_COVER switch to %d fail", m_val);
}
break;
case MODE_CHARGER:
ret = fts_write_reg(FTS_REG_CHARGER_MODE_EN, m_val);
if (ret < 0) {
FTS_ERROR("MODE_CHARGER switch to %d fail", m_val);
}
break;
default:
FTS_ERROR("mode(%d) unsupport", mode);
ret = -EINVAL;
break;
}
return ret;
}
static ssize_t fts_glove_mode_show(
struct device *dev, struct device_attribute *attr, char *buf)
{
int count = 0;
u8 val = 0;
struct fts_ts_data *ts_data = fts_data;
struct input_dev *input_dev = ts_data->input_dev;
mutex_lock(&input_dev->mutex);
fts_read_reg(FTS_REG_GLOVE_MODE_EN, &val);
count = snprintf(buf + count, PAGE_SIZE, "Glove Mode:%s\n",
ts_data->glove_mode ? "On" : "Off");
count += snprintf(buf + count, PAGE_SIZE, "Glove Reg(0xC0):%d\n", val);
mutex_unlock(&input_dev->mutex);
return count;
}
static ssize_t fts_glove_mode_store(
struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
struct fts_ts_data *ts_data = fts_data;
if (FTS_SYSFS_ECHO_ON(buf)) {
if (!ts_data->glove_mode) {
FTS_DEBUG("enter glove mode");
ret = fts_ex_mode_switch(MODE_GLOVE, ENABLE);
if (ret >= 0) {
ts_data->glove_mode = ENABLE;
}
}
} else if (FTS_SYSFS_ECHO_OFF(buf)) {
if (ts_data->glove_mode) {
FTS_DEBUG("exit glove mode");
ret = fts_ex_mode_switch(MODE_GLOVE, DISABLE);
if (ret >= 0) {
ts_data->glove_mode = DISABLE;
}
}
}
FTS_DEBUG("glove mode:%d", ts_data->glove_mode);
return count;
}
static ssize_t fts_cover_mode_show(
struct device *dev, struct device_attribute *attr, char *buf)
{
int count = 0;
u8 val = 0;
struct fts_ts_data *ts_data = fts_data;
struct input_dev *input_dev = ts_data->input_dev;
mutex_lock(&input_dev->mutex);
fts_read_reg(FTS_REG_COVER_MODE_EN, &val);
count = snprintf(buf + count, PAGE_SIZE, "Cover Mode:%s\n",
ts_data->cover_mode ? "On" : "Off");
count += snprintf(buf + count, PAGE_SIZE, "Cover Reg(0xC1):%d\n", val);
mutex_unlock(&input_dev->mutex);
return count;
}
static ssize_t fts_cover_mode_store(
struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
struct fts_ts_data *ts_data = fts_data;
if (FTS_SYSFS_ECHO_ON(buf)) {
if (!ts_data->cover_mode) {
FTS_DEBUG("enter cover mode");
ret = fts_ex_mode_switch(MODE_COVER, ENABLE);
if (ret >= 0) {
ts_data->cover_mode = ENABLE;
}
}
} else if (FTS_SYSFS_ECHO_OFF(buf)) {
if (ts_data->cover_mode) {
FTS_DEBUG("exit cover mode");
ret = fts_ex_mode_switch(MODE_COVER, DISABLE);
if (ret >= 0) {
ts_data->cover_mode = DISABLE;
}
}
}
FTS_DEBUG("cover mode:%d", ts_data->cover_mode);
return count;
}
static ssize_t fts_charger_mode_show(
struct device *dev, struct device_attribute *attr, char *buf)
{
int count = 0;
u8 val = 0;
struct fts_ts_data *ts_data = fts_data;
struct input_dev *input_dev = ts_data->input_dev;
mutex_lock(&input_dev->mutex);
fts_read_reg(FTS_REG_CHARGER_MODE_EN, &val);
count = snprintf(buf + count, PAGE_SIZE, "Charger Mode:%s\n",
ts_data->charger_mode ? "On" : "Off");
count += snprintf(buf + count, PAGE_SIZE, "Charger Reg(0x8B):%d\n", val);
mutex_unlock(&input_dev->mutex);
return count;
}
static ssize_t fts_charger_mode_store(
struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
struct fts_ts_data *ts_data = fts_data;
if (FTS_SYSFS_ECHO_ON(buf)) {
if (!ts_data->charger_mode) {
FTS_DEBUG("enter charger mode");
ret = fts_ex_mode_switch(MODE_CHARGER, ENABLE);
if (ret >= 0) {
ts_data->charger_mode = ENABLE;
}
}
} else if (FTS_SYSFS_ECHO_OFF(buf)) {
if (ts_data->charger_mode) {
FTS_DEBUG("exit charger mode");
ret = fts_ex_mode_switch(MODE_CHARGER, DISABLE);
if (ret >= 0) {
ts_data->charger_mode = DISABLE;
}
}
}
FTS_DEBUG("charger mode:%d", ts_data->glove_mode);
return count;
}
/* read and write charger mode
* read example: cat fts_glove_mode ---read glove mode
* write example:echo 1 > fts_glove_mode ---write glove mode to 01
*/
static DEVICE_ATTR(fts_glove_mode, S_IRUGO | S_IWUSR,
fts_glove_mode_show, fts_glove_mode_store);
static DEVICE_ATTR(fts_cover_mode, S_IRUGO | S_IWUSR,
fts_cover_mode_show, fts_cover_mode_store);
static DEVICE_ATTR(fts_charger_mode, S_IRUGO | S_IWUSR,
fts_charger_mode_show, fts_charger_mode_store);
static struct attribute *fts_touch_mode_attrs[] = {
&dev_attr_fts_glove_mode.attr,
&dev_attr_fts_cover_mode.attr,
&dev_attr_fts_charger_mode.attr,
NULL,
};
static struct attribute_group fts_touch_mode_group = {
.attrs = fts_touch_mode_attrs,
};
int fts_ex_mode_recovery(struct fts_ts_data *ts_data)
{
if (ts_data->glove_mode) {
fts_ex_mode_switch(MODE_GLOVE, ENABLE);
}
if (ts_data->cover_mode) {
fts_ex_mode_switch(MODE_COVER, ENABLE);
}
if (ts_data->charger_mode) {
fts_ex_mode_switch(MODE_CHARGER, ENABLE);
}
return 0;
}
int fts_ex_mode_init(struct fts_ts_data *ts_data)
{
int ret = 0;
ts_data->glove_mode = DISABLE;
ts_data->cover_mode = DISABLE;
ts_data->charger_mode = DISABLE;
ret = sysfs_create_group(&ts_data->dev->kobj, &fts_touch_mode_group);
if (ret < 0) {
FTS_ERROR("create sysfs(ex_mode) fail");
sysfs_remove_group(&ts_data->dev->kobj, &fts_touch_mode_group);
return ret;
} else {
FTS_DEBUG("create sysfs(ex_mode) succeedfully");
}
return 0;
}
int fts_ex_mode_exit(struct fts_ts_data *ts_data)
{
sysfs_remove_group(&ts_data->dev->kobj, &fts_touch_mode_group);
return 0;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,217 @@
/************************************************************************
* Copyright (c) 2012-2020, Focaltech Systems (R)£¬All Rights Reserved.
*
* File Name: focaltech_flash.h
*
* Author: Focaltech Driver Team
*
* Created: 2016-08-07
*
* Abstract:
*
************************************************************************/
#ifndef __LINUX_FOCALTECH_FLASH_H__
#define __LINUX_FOCALTECH_FLASH_H__
/*****************************************************************************
* 1.Included header files
*****************************************************************************/
#include "focaltech_core.h"
/*****************************************************************************
* Private constant and macro definitions using #define
*****************************************************************************/
#define FTS_CMD_RESET 0x07
#define FTS_ROMBOOT_CMD_SET_PRAM_ADDR 0xAD
#define FTS_ROMBOOT_CMD_SET_PRAM_ADDR_LEN 4
#define FTS_ROMBOOT_CMD_WRITE 0xAE
#define FTS_ROMBOOT_CMD_START_APP 0x08
#define FTS_DELAY_PRAMBOOT_START 100
#define FTS_ROMBOOT_CMD_ECC 0xCC
#define FTS_PRAM_SADDR 0x000000
#define FTS_DRAM_SADDR 0xD00000
#define FTS_CMD_READ 0x03
#define FTS_CMD_READ_DELAY 1
#define FTS_CMD_READ_LEN 4
#define FTS_CMD_READ_LEN_SPI 6
#define FTS_CMD_FLASH_TYPE 0x05
#define FTS_CMD_FLASH_MODE 0x09
#define FLASH_MODE_WRITE_FLASH_VALUE 0x0A
#define FLASH_MODE_UPGRADE_VALUE 0x0B
#define FLASH_MODE_LIC_VALUE 0x0C
#define FLASH_MODE_PARAM_VALUE 0x0D
#define FTS_CMD_ERASE_APP 0x61
#define FTS_REASE_APP_DELAY 1350
#define FTS_ERASE_SECTOR_DELAY 60
#define FTS_RETRIES_REASE 50
#define FTS_RETRIES_DELAY_REASE 400
#define FTS_CMD_FLASH_STATUS 0x6A
#define FTS_CMD_FLASH_STATUS_LEN 2
#define FTS_CMD_FLASH_STATUS_NOP 0x0000
#define FTS_CMD_FLASH_STATUS_ECC_OK 0xF055
#define FTS_CMD_FLASH_STATUS_ERASE_OK 0xF0AA
#define FTS_CMD_FLASH_STATUS_WRITE_OK 0x1000
#define FTS_CMD_ECC_INIT 0x64
#define FTS_CMD_ECC_CAL 0x65
#define FTS_CMD_ECC_CAL_LEN 7
#define FTS_RETRIES_ECC_CAL 10
#define FTS_RETRIES_DELAY_ECC_CAL 50
#define FTS_CMD_ECC_READ 0x66
#define FTS_CMD_DATA_LEN 0xB0
#define FTS_CMD_APP_DATA_LEN_INCELL 0x7A
#define FTS_CMD_DATA_LEN_LEN 4
#define FTS_CMD_SET_WFLASH_ADDR 0xAB
#define FTS_CMD_SET_RFLASH_ADDR 0xAC
#define FTS_LEN_SET_ADDR 4
#define FTS_CMD_WRITE 0xBF
#define FTS_RETRIES_WRITE 100
#define FTS_RETRIES_DELAY_WRITE 1
#define FTS_CMD_WRITE_LEN 6
#define FTS_DELAY_READ_ID 20
#define FTS_DELAY_UPGRADE_RESET 80
#define PRAMBOOT_MIN_SIZE 0x120
#define PRAMBOOT_MAX_SIZE (64*1024)
#define FTS_FLASH_PACKET_LENGTH 32 /* max=128 */
#define FTS_MAX_LEN_ECC_CALC 0xFFFE /* must be even */
#define FTS_MIN_LEN 0x120
#define FTS_MAX_LEN_FILE (256 * 1024)
#define FTS_MAX_LEN_APP (64 * 1024)
#define FTS_MAX_LEN_SECTOR (4 * 1024)
#define FTS_CONIFG_VENDORID_OFF 0x04
#define FTS_CONIFG_MODULEID_OFF 0x1E
#define FTS_CONIFG_PROJECTID_OFF 0x20
#define FTS_APPINFO_OFF 0x100
#define FTS_APPINFO_APPLEN_OFF 0x00
#define FTS_APPINFO_APPLEN2_OFF 0x12
#define FTS_REG_UPGRADE 0xFC
#define FTS_REG_UPGRADE2 0xBC
#define FTS_UPGRADE_AA 0xAA
#define FTS_UPGRADE_55 0x55
#define FTS_DELAY_UPGRADE_AA 10
#define FTS_UPGRADE_LOOP 30
#define FTS_HEADER_LEN 32
#define FTS_FW_BIN_FILEPATH "/sdcard/"
#define FTS_FW_IDE_SIG "IDE_"
#define FTS_FW_IDE_SIG_LEN 4
#define MAX_MODULE_VENDOR_NAME_LEN 16
#define FTS_ROMBOOT_CMD_ECC_NEW_LEN 7
#define FTS_ECC_FINISH_TIMEOUT 100
#define FTS_ROMBOOT_CMD_ECC_FINISH 0xCE
#define FTS_ROMBOOT_CMD_ECC_FINISH_OK_A5 0xA5
#define FTS_ROMBOOT_CMD_ECC_FINISH_OK_00 0x00
#define FTS_ROMBOOT_CMD_ECC_READ 0xCD
#define AL2_FCS_COEF ((1 << 15) + (1 << 10) + (1 << 3))
#define FTS_APP_INFO_OFFSET 0x100
enum FW_STATUS {
FTS_RUN_IN_ERROR,
FTS_RUN_IN_APP,
FTS_RUN_IN_ROM,
FTS_RUN_IN_PRAM,
FTS_RUN_IN_BOOTLOADER,
};
enum FW_FLASH_MODE {
FLASH_MODE_APP,
FLASH_MODE_LIC,
FLASH_MODE_PARAM,
FLASH_MODE_ALL,
};
enum ECC_CHECK_MODE {
ECC_CHECK_MODE_XOR,
ECC_CHECK_MODE_CRC16,
};
enum UPGRADE_SPEC {
UPGRADE_SPEC_V_1_0 = 0x0100,
};
/*****************************************************************************
* Private enumerations, structures and unions using typedef
*****************************************************************************/
/* IC info */
struct upgrade_func {
u16 ctype[FTS_MAX_COMPATIBLE_TYPE];
u32 fwveroff;
u32 fwcfgoff;
u32 appoff;
u32 licoff;
u32 paramcfgoff;
u32 paramcfgveroff;
u32 paramcfg2off;
int pram_ecc_check_mode;
int fw_ecc_check_mode;
int upgspec_version;
bool new_return_value_from_ic;
bool appoff_handle_in_ic;
bool is_reset_register_BC;
bool read_boot_id_need_reset;
bool hid_supported;
bool pramboot_supported;
u8 *pramboot;
u32 pb_length;
int (*init)(u8 *, u32);
int (*write_pramboot_private)(void);
int (*upgrade)(u8 *, u32);
int (*get_hlic_ver)(u8 *);
int (*lic_upgrade)(u8 *, u32);
int (*param_upgrade)(u8 *, u32);
int (*force_upgrade)(u8 *, u32);
};
struct upgrade_setting_nf {
u8 rom_idh;
u8 rom_idl;
u16 reserved;
u32 app2_offset;
u32 ecclen_max;
u8 eccok_val;
u8 upgsts_boot;
u8 delay_init;
bool spi_pe;
bool half_length;
bool fd_check;
bool drwr_support;
};
struct upgrade_module {
int id;
char vendor_name[MAX_MODULE_VENDOR_NAME_LEN];
u8 *fw_file;
u32 fw_len;
};
struct fts_upgrade {
struct fts_ts_data *ts_data;
struct upgrade_module *module_info;
struct upgrade_func *func;
struct upgrade_setting_nf *setting_nf;
int module_id;
bool fw_from_request;
u8 *fw;
u32 fw_length;
u8 *lic;
u32 lic_length;
};
/*****************************************************************************
* Global variable or extern global variabls/functions
*****************************************************************************/
extern struct upgrade_func upgrade_func_ft5452i;
/*****************************************************************************
* Static function prototypes
*****************************************************************************/
int fts_fwupg_reset_in_boot(void);
int fts_fwupg_enter_into_boot(void);
int fts_fwupg_erase(u32 delay);
int fts_fwupg_ecc_cal(u32 saddr, u32 len);
int fts_flash_write_buf(u32 saddr, u8 *buf, u32 len, u32 delay);
int fts_flash_read_buf(u32 saddr, u8 *buf, u32 len);
int fts_fwupg_upgrade(struct fts_upgrade *upg);
#endif

View file

@ -0,0 +1 @@
obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_upgrade_ft5452i.o

View file

@ -0,0 +1,186 @@
/*
*
* FocalTech fts TouchScreen driver.
*
* Copyright (c) 2012-2019, Focaltech Ltd. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
/*****************************************************************************
*
* File Name: focaltech_upgrade_ft5452.c
*
* Author: Focaltech Driver Team
*
* Created: 2016-08-15
*
* Abstract:
*
* Reference:
*
*****************************************************************************/
/*****************************************************************************
* 1.Included header files
*****************************************************************************/
#include "../focaltech_flash.h"
/************************************************************************
* Name: fts_ft5452_upgrade
* Brief:
* Input:
* Output:
* Return: return 0 if success, otherwise return error code
***********************************************************************/
static int fts_ft5452_upgrade(u8 *buf, u32 len)
{
int ret = 0;
u32 start_addr = 0;
u8 cmd[4] = { 0 };
int ecc_in_host = 0;
int ecc_in_tp = 0;
int i = 0;
u8 wbuf[7] = { 0 };
u8 reg_val[4] = {0};
if (NULL == buf) {
FTS_ERROR("fw buf is null");
return -EINVAL;
}
if ((len < FTS_MIN_LEN) || (len > (60 * 1024))) {
FTS_ERROR("fw buffer len(%x) fail", len);
return -EINVAL;
}
/* enter into upgrade environment */
ret = fts_fwupg_enter_into_boot();
if (ret < 0) {
FTS_ERROR("enter into pramboot/bootloader fail,ret=%d", ret);
goto fw_reset;
}
cmd[0] = FTS_CMD_FLASH_MODE;
cmd[1] = FLASH_MODE_UPGRADE_VALUE;
ret = fts_write(cmd, 2);
if (ret < 0) {
FTS_ERROR("upgrade mode(09) cmd write fail");
goto fw_reset;
}
cmd[0] = FTS_CMD_DATA_LEN;
cmd[1] = BYTE_OFF_16(len);
cmd[2] = BYTE_OFF_8(len);
cmd[3] = BYTE_OFF_0(len);
ret = fts_write(cmd, FTS_CMD_DATA_LEN_LEN);
if (ret < 0) {
FTS_ERROR("data len cmd write fail");
goto fw_reset;
}
ret = fts_fwupg_erase(FTS_REASE_APP_DELAY);
if (ret < 0) {
FTS_ERROR("erase cmd write fail");
goto fw_reset;
}
/* write app */
start_addr = upgrade_func_ft5452.appoff;
ecc_in_host = fts_flash_write_buf(start_addr, buf, len, 1);
if (ecc_in_host < 0 ) {
FTS_ERROR("lcd initial code write fail");
goto fw_reset;
}
FTS_INFO( "**********read out checksum**********");
/* check sum init */
wbuf[0] = FTS_CMD_ECC_INIT;
ret = fts_write(wbuf, 1);
if (ret < 0) {
FTS_ERROR("ecc init cmd write fail");
return ret;
}
/* send commond to start checksum */
wbuf[0] = FTS_CMD_ECC_CAL;
wbuf[1] = BYTE_OFF_16(start_addr);
wbuf[2] = BYTE_OFF_8(start_addr);
wbuf[3] = BYTE_OFF_0(start_addr);
wbuf[4] = BYTE_OFF_16(len);
wbuf[5] = BYTE_OFF_8(len);
wbuf[6] = BYTE_OFF_0(len);
FTS_DEBUG("ecc calc startaddr:0x%04x, len:%d", start_addr, len);
ret = fts_write(wbuf, 7);
if (ret < 0) {
FTS_ERROR("ecc calc cmd write fail");
return ret;
}
msleep(len / 256);
/* read status if check sum is finished */
for (i = 0; i < FTS_RETRIES_ECC_CAL; i++) {
wbuf[0] = FTS_CMD_FLASH_STATUS;
reg_val[0] = reg_val[1] = 0x00;
fts_read(wbuf, 1, reg_val, 2);
FTS_DEBUG("[UPGRADE]: reg_val[0]=%02x reg_val[0]=%02x!!", reg_val[0], reg_val[1]);
if ((0xF0 == reg_val[0]) && (0x55 == reg_val[1])) {
break;
}
msleep(FTS_RETRIES_DELAY_ECC_CAL);
}
/* read out check sum */
wbuf[0] = FTS_CMD_ECC_READ;
ret = fts_read(wbuf, 1, reg_val, 1);
if (ret < 0) {
FTS_ERROR( "ecc read cmd write fail");
return ret;
}
ecc_in_tp = reg_val[0];
FTS_INFO("ecc in tp:%x, host:%x", ecc_in_tp, ecc_in_host);
if (ecc_in_tp != ecc_in_host) {
FTS_ERROR("ecc check fail");
goto fw_reset;
}
FTS_INFO("upgrade success, reset to normal boot");
ret = fts_fwupg_reset_in_boot();
if (ret < 0) {
FTS_ERROR("reset to normal boot fail");
}
msleep(200);
return 0;
fw_reset:
FTS_INFO("upgrade fail, reset to normal boot");
ret = fts_fwupg_reset_in_boot();
if (ret < 0) {
FTS_ERROR("reset to normal boot fail");
}
return -EIO;
}
struct upgrade_func upgrade_func_ft5452 = {
.ctype = {0x81},
.fwveroff = 0x010E,
.fwcfgoff = 0x1FFB0,
.appoff = 0x0000,
.pramboot_supported = false,
.hid_supported = true,
.upgrade = fts_ft5452_upgrade,
};

View file

@ -0,0 +1,194 @@
/*
*
* FocalTech fts TouchScreen driver.
*
* Copyright (c) 2012-2020, Focaltech Ltd. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
/*****************************************************************************
*
* File Name: focaltech_upgrade_ft5452.c
*
* Author: Focaltech Driver Team
*
* Created: 2016-08-15
*
* Abstract:
*
* Reference:
*
*****************************************************************************/
/*****************************************************************************
* 1.Included header files
*****************************************************************************/
#include "../focaltech_flash.h"
/*****************************************************************************
* Global variable or extern global variabls/functions
*****************************************************************************/
u8 pb_file_ft5452i[] = {
#include "../include/pramboot/FT5452i_Pramboot_v4.1_20210427.i"
};
/*****************************************************************************
* Private constant and macro definitions using #define
*****************************************************************************/
/************************************************************************
* Name: fts_ft5452_upgrade
* Brief:
* Input:
* Output:
* Return: return 0 if success, otherwise return error code
***********************************************************************/
static int fts_ft5452i_upgrade(u8 *buf, u32 len)
{
int ret = 0;
u32 start_addr = 0;
u8 cmd[4] = { 0 };
int ecc_in_host = 0;
int ecc_in_tp = 0;
int i = 0;
u8 wbuf[7] = { 0 };
u8 reg_val[4] = {0};
if ((NULL == buf) || (len < FTS_MIN_LEN)) {
FTS_ERROR("buffer/len(%x) is invalid", len);
return -EINVAL;
}
/* enter into upgrade environment */
ret = fts_fwupg_enter_into_boot();
if (ret < 0) {
FTS_ERROR("enter into pramboot/bootloader fail,ret=%d", ret);
goto fw_reset;
}
cmd[0] = FTS_CMD_FLASH_MODE;
cmd[1] = FLASH_MODE_UPGRADE_VALUE;
ret = fts_write(cmd, 2);
if (ret < 0) {
FTS_ERROR("upgrade mode(09) cmd write fail");
goto fw_reset;
}
cmd[0] = FTS_CMD_DATA_LEN;
cmd[1] = BYTE_OFF_16(len);
cmd[2] = BYTE_OFF_8(len);
cmd[3] = BYTE_OFF_0(len);
ret = fts_write(cmd, FTS_CMD_DATA_LEN_LEN);
if (ret < 0) {
FTS_ERROR("data len cmd write fail");
goto fw_reset;
}
ret = fts_fwupg_erase(FTS_REASE_APP_DELAY);
if (ret < 0) {
FTS_ERROR("erase cmd write fail");
goto fw_reset;
}
/* write app */
start_addr = upgrade_func_ft5452i.appoff;
ecc_in_host = fts_flash_write_buf(start_addr, buf, len, 1);
if (ecc_in_host < 0 ) {
FTS_ERROR("flash write fail");
goto fw_reset;
}
FTS_INFO( "**********read out checksum**********");
/* check sum init */
wbuf[0] = FTS_CMD_ECC_INIT;
ret = fts_write(wbuf, 1);
if (ret < 0) {
FTS_ERROR("ecc init cmd write fail");
return ret;
}
/* send commond to start checksum */
wbuf[0] = FTS_CMD_ECC_CAL;
wbuf[1] = BYTE_OFF_16(start_addr);
wbuf[2] = BYTE_OFF_8(start_addr);
wbuf[3] = BYTE_OFF_0(start_addr);
wbuf[4] = BYTE_OFF_16(len);
wbuf[5] = BYTE_OFF_8(len);
wbuf[6] = BYTE_OFF_0(len);
FTS_DEBUG("ecc calc startaddr:0x%04x, len:%d", start_addr, len);
ret = fts_write(wbuf, 7);
if (ret < 0) {
FTS_ERROR("ecc calc cmd write fail");
return ret;
}
msleep(len / 256);
/* read status if check sum is finished */
for (i = 0; i < FTS_RETRIES_ECC_CAL; i++) {
wbuf[0] = FTS_CMD_FLASH_STATUS;
reg_val[0] = reg_val[1] = 0x00;
fts_read(wbuf, 1, reg_val, 2);
FTS_DEBUG("[UPGRADE]: reg_val[0]=%02x reg_val[0]=%02x!!", reg_val[0], reg_val[1]);
if ((0xF0 == reg_val[0]) && (0x55 == reg_val[1])) {
break;
}
msleep(FTS_RETRIES_DELAY_ECC_CAL);
}
/* read out check sum */
wbuf[0] = FTS_CMD_ECC_READ;
ret = fts_read(wbuf, 1, reg_val, 1);
if (ret < 0) {
FTS_ERROR( "ecc read cmd write fail");
return ret;
}
ecc_in_tp = reg_val[0];
FTS_INFO("ecc in tp:%x, host:%x", ecc_in_tp, ecc_in_host);
if (ecc_in_tp != ecc_in_host) {
FTS_ERROR("ecc check fail");
goto fw_reset;
}
FTS_INFO("upgrade success, reset to normal boot");
ret = fts_fwupg_reset_in_boot();
if (ret < 0) {
FTS_ERROR("reset to normal boot fail");
}
msleep(200);
return 0;
fw_reset:
FTS_INFO("upgrade fail, reset to normal boot");
ret = fts_fwupg_reset_in_boot();
if (ret < 0) {
FTS_ERROR("reset to normal boot fail");
}
return -EIO;
}
struct upgrade_func upgrade_func_ft5452i = {
.ctype = {0x89},
.fwveroff = 0x010E,
.fwcfgoff = 0x1FFB0,
.appoff = 0x0000,
.pramboot_supported = true,
.pramboot = pb_file_ft5452i,
.pb_length = sizeof(pb_file_ft5452i),
.pram_ecc_check_mode = ECC_CHECK_MODE_CRC16,
.new_return_value_from_ic = true,
.hid_supported = false,
.upgrade = fts_ft5452i_upgrade,
};

View file

@ -0,0 +1,460 @@
/*
*
* FocalTech TouchScreen driver.
*
* Copyright (c) 2012-2020, Focaltech Ltd. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
/*****************************************************************************
*
* File Name: focaltech_gestrue.c
*
* Author: Focaltech Driver Team
*
* Created: 2016-08-08
*
* Abstract:
*
* Reference:
*
*****************************************************************************/
/*****************************************************************************
* 1.Included header files
*****************************************************************************/
#include "focaltech_core.h"
/******************************************************************************
* Private constant and macro definitions using #define
*****************************************************************************/
#define KEY_GESTURE_U KEY_U
#define KEY_GESTURE_UP KEY_UP
#define KEY_GESTURE_DOWN KEY_DOWN
#define KEY_GESTURE_LEFT KEY_LEFT
#define KEY_GESTURE_RIGHT KEY_RIGHT
#define KEY_GESTURE_O KEY_O
#define KEY_GESTURE_E KEY_E
#define KEY_GESTURE_M KEY_M
#define KEY_GESTURE_L KEY_L
#define KEY_GESTURE_W KEY_W
#define KEY_GESTURE_S KEY_S
#define KEY_GESTURE_V KEY_V
#define KEY_GESTURE_C KEY_C
#define KEY_GESTURE_Z KEY_Z
#define GESTURE_LEFT 0x20
#define GESTURE_RIGHT 0x21
#define GESTURE_UP 0x22
#define GESTURE_DOWN 0x23
#define GESTURE_DOUBLECLICK 0x24
#define GESTURE_O 0x30
#define GESTURE_W 0x31
#define GESTURE_M 0x32
#define GESTURE_E 0x33
#define GESTURE_L 0x44
#define GESTURE_S 0x46
#define GESTURE_V 0x54
#define GESTURE_Z 0x41
#define GESTURE_C 0x34
/*****************************************************************************
* Private enumerations, structures and unions using typedef
*****************************************************************************/
/*
* gesture_id - mean which gesture is recognised
* point_num - points number of this gesture
* coordinate_x - All gesture point x coordinate
* coordinate_y - All gesture point y coordinate
* mode - gesture enable/disable, need enable by host
* - 1:enable gesture function(default) 0:disable
* active - gesture work flag,
* always set 1 when suspend, set 0 when resume
*/
struct fts_gesture_st {
u8 gesture_id;
u8 point_num;
u16 coordinate_x[FTS_GESTURE_POINTS_MAX];
u16 coordinate_y[FTS_GESTURE_POINTS_MAX];
};
/*****************************************************************************
* Static variables
*****************************************************************************/
static struct fts_gesture_st fts_gesture_data;
/*****************************************************************************
* Global variable or extern global variabls/functions
*****************************************************************************/
/*****************************************************************************
* Static function prototypes
*****************************************************************************/
static ssize_t fts_gesture_show(
struct device *dev, struct device_attribute *attr, char *buf)
{
int count = 0;
u8 val = 0;
struct fts_ts_data *ts_data = fts_data;
mutex_lock(&ts_data->input_dev->mutex);
fts_read_reg(FTS_REG_GESTURE_EN, &val);
count = snprintf(buf, PAGE_SIZE, "Gesture Mode:%s\n",
ts_data->gesture_mode ? "On" : "Off");
count += snprintf(buf + count, PAGE_SIZE, "Reg(0xD0)=%d\n", val);
mutex_unlock(&ts_data->input_dev->mutex);
return count;
}
static ssize_t fts_gesture_store(
struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
struct fts_ts_data *ts_data = fts_data;
mutex_lock(&ts_data->input_dev->mutex);
if (FTS_SYSFS_ECHO_ON(buf)) {
FTS_DEBUG("enable gesture");
ts_data->gesture_mode = ENABLE;
} else if (FTS_SYSFS_ECHO_OFF(buf)) {
FTS_DEBUG("disable gesture");
ts_data->gesture_mode = DISABLE;
}
mutex_unlock(&ts_data->input_dev->mutex);
return count;
}
static ssize_t fts_gesture_buf_show(
struct device *dev, struct device_attribute *attr, char *buf)
{
int count = 0;
int i = 0;
struct input_dev *input_dev = fts_data->input_dev;
struct fts_gesture_st *gesture = &fts_gesture_data;
mutex_lock(&input_dev->mutex);
count = snprintf(buf, PAGE_SIZE, "Gesture ID:%d\n", gesture->gesture_id);
count += snprintf(buf + count, PAGE_SIZE, "Gesture PointNum:%d\n",
gesture->point_num);
count += snprintf(buf + count, PAGE_SIZE, "Gesture Points Buffer:\n");
/* save point data,max:6 */
for (i = 0; i < FTS_GESTURE_POINTS_MAX; i++) {
count += snprintf(buf + count, PAGE_SIZE, "%3d(%4d,%4d) ", i,
gesture->coordinate_x[i], gesture->coordinate_y[i]);
if ((i + 1) % 4 == 0)
count += snprintf(buf + count, PAGE_SIZE, "\n");
}
count += snprintf(buf + count, PAGE_SIZE, "\n");
mutex_unlock(&input_dev->mutex);
return count;
}
static ssize_t fts_gesture_buf_store(
struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
return -EPERM;
}
/* sysfs gesture node
* read example: cat fts_gesture_mode ---read gesture mode
* write example:echo 1 > fts_gesture_mode --- write gesture mode to 1
*
*/
static DEVICE_ATTR(fts_gesture_mode, S_IRUGO | S_IWUSR, fts_gesture_show,
fts_gesture_store);
/*
* read example: cat fts_gesture_buf --- read gesture buf
*/
static DEVICE_ATTR(fts_gesture_buf, S_IRUGO | S_IWUSR,
fts_gesture_buf_show, fts_gesture_buf_store);
static struct attribute *fts_gesture_mode_attrs[] = {
&dev_attr_fts_gesture_mode.attr,
&dev_attr_fts_gesture_buf.attr,
NULL,
};
static struct attribute_group fts_gesture_group = {
.attrs = fts_gesture_mode_attrs,
};
static int fts_create_gesture_sysfs(struct device *dev)
{
int ret = 0;
ret = sysfs_create_group(&dev->kobj, &fts_gesture_group);
if (ret) {
FTS_ERROR("gesture sys node create fail");
sysfs_remove_group(&dev->kobj, &fts_gesture_group);
return ret;
}
return 0;
}
static void fts_gesture_report(struct input_dev *input_dev, int gesture_id)
{
int gesture;
FTS_DEBUG("gesture_id:0x%x", gesture_id);
switch (gesture_id) {
case GESTURE_LEFT:
gesture = KEY_GESTURE_LEFT;
break;
case GESTURE_RIGHT:
gesture = KEY_GESTURE_RIGHT;
break;
case GESTURE_UP:
gesture = KEY_GESTURE_UP;
break;
case GESTURE_DOWN:
gesture = KEY_GESTURE_DOWN;
break;
case GESTURE_DOUBLECLICK:
gesture = KEY_GESTURE_U;
break;
case GESTURE_O:
gesture = KEY_GESTURE_O;
break;
case GESTURE_W:
gesture = KEY_GESTURE_W;
break;
case GESTURE_M:
gesture = KEY_GESTURE_M;
break;
case GESTURE_E:
gesture = KEY_GESTURE_E;
break;
case GESTURE_L:
gesture = KEY_GESTURE_L;
break;
case GESTURE_S:
gesture = KEY_GESTURE_S;
break;
case GESTURE_V:
gesture = KEY_GESTURE_V;
break;
case GESTURE_Z:
gesture = KEY_GESTURE_Z;
break;
case GESTURE_C:
gesture = KEY_GESTURE_C;
break;
default:
gesture = -1;
break;
}
/* report event key */
if (gesture != -1) {
FTS_DEBUG("Gesture Code=%d", gesture);
input_report_key(input_dev, gesture, 1);
input_sync(input_dev);
input_report_key(input_dev, gesture, 0);
input_sync(input_dev);
}
}
/*****************************************************************************
* Name: fts_gesture_readdata
* Brief: Read information about gesture: enable flag/gesture points..., if ges-
* ture enable, save gesture points' information, and report to OS.
* It will be called this function every intrrupt when FTS_GESTURE_EN = 1
*
* gesture data length: 1(enable) + 1(reserve) + 2(header) + 6 * 4
* Input: ts_data - global struct data
* data - gesture data buffer if non-flash, else NULL
* Output:
* Return: 0 - read gesture data successfully, the report data is gesture data
* 1 - tp not in suspend/gesture not enable in TP FW
* -Exx - error
*****************************************************************************/
int fts_gesture_readdata(struct fts_ts_data *ts_data, u8 *data)
{
int ret = 0;
int i = 0;
int index = 0;
u8 buf[FTS_GESTURE_DATA_LEN] = { 0 };
struct input_dev *input_dev = ts_data->input_dev;
struct fts_gesture_st *gesture = &fts_gesture_data;
if (!ts_data->suspended || !ts_data->gesture_mode) {
return 1;
}
ret = fts_read_reg(FTS_REG_GESTURE_EN, &buf[0]);
if ((ret < 0) || (buf[0] != ENABLE)) {
FTS_DEBUG("gesture not enable in fw, don't process gesture");
return 1;
}
buf[2] = FTS_REG_GESTURE_OUTPUT_ADDRESS;
ret = fts_read(&buf[2], 1, &buf[2], FTS_GESTURE_DATA_LEN - 2);
if (ret < 0) {
FTS_ERROR("read gesture header data fail");
return ret;
}
/* init variable before read gesture point */
memset(gesture->coordinate_x, 0, FTS_GESTURE_POINTS_MAX * sizeof(u16));
memset(gesture->coordinate_y, 0, FTS_GESTURE_POINTS_MAX * sizeof(u16));
gesture->gesture_id = buf[2];
gesture->point_num = buf[3];
FTS_DEBUG("gesture_id=%d, point_num=%d",
gesture->gesture_id, gesture->point_num);
/* save point data,max:6 */
for (i = 0; i < FTS_GESTURE_POINTS_MAX; i++) {
index = 4 * i + 4;
gesture->coordinate_x[i] = (u16)(((buf[0 + index] & 0x0F) << 8)
+ buf[1 + index]);
gesture->coordinate_y[i] = (u16)(((buf[2 + index] & 0x0F) << 8)
+ buf[3 + index]);
}
/* report gesture to OS */
fts_gesture_report(input_dev, gesture->gesture_id);
return 0;
}
void fts_gesture_recovery(struct fts_ts_data *ts_data)
{
if (ts_data->gesture_mode && ts_data->suspended) {
FTS_DEBUG("gesture recovery...");
fts_write_reg(0xD1, 0xFF);
fts_write_reg(0xD2, 0xFF);
fts_write_reg(0xD5, 0xFF);
fts_write_reg(0xD6, 0xFF);
fts_write_reg(0xD7, 0xFF);
fts_write_reg(0xD8, 0xFF);
fts_write_reg(FTS_REG_GESTURE_EN, ENABLE);
}
}
int fts_gesture_suspend(struct fts_ts_data *ts_data)
{
int i = 0;
u8 state = 0xFF;
FTS_FUNC_ENTER();
if (enable_irq_wake(ts_data->irq)) {
FTS_DEBUG("enable_irq_wake(irq:%d) fail", ts_data->irq);
}
for (i = 0; i < 5; i++) {
fts_write_reg(0xD1, 0xFF);
fts_write_reg(0xD2, 0xFF);
fts_write_reg(0xD5, 0xFF);
fts_write_reg(0xD6, 0xFF);
fts_write_reg(0xD7, 0xFF);
fts_write_reg(0xD8, 0xFF);
fts_write_reg(FTS_REG_GESTURE_EN, ENABLE);
msleep(1);
fts_read_reg(FTS_REG_GESTURE_EN, &state);
if (state == ENABLE)
break;
}
if (i >= 5)
FTS_ERROR("make IC enter into gesture(suspend) fail,state:%x", state);
else
FTS_INFO("Enter into gesture(suspend) successfully");
FTS_FUNC_EXIT();
return 0;
}
int fts_gesture_resume(struct fts_ts_data *ts_data)
{
int i = 0;
u8 state = 0xFF;
FTS_FUNC_ENTER();
if (disable_irq_wake(ts_data->irq)) {
FTS_DEBUG("disable_irq_wake(irq:%d) fail", ts_data->irq);
}
for (i = 0; i < 5; i++) {
fts_write_reg(FTS_REG_GESTURE_EN, DISABLE);
msleep(1);
fts_read_reg(FTS_REG_GESTURE_EN, &state);
if (state == DISABLE)
break;
}
if (i >= 5)
FTS_ERROR("make IC exit gesture(resume) fail,state:%x", state);
else
FTS_INFO("resume from gesture successfully");
FTS_FUNC_EXIT();
return 0;
}
int fts_gesture_init(struct fts_ts_data *ts_data)
{
struct input_dev *input_dev = ts_data->input_dev;
FTS_FUNC_ENTER();
input_set_capability(input_dev, EV_KEY, KEY_POWER);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_U);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_UP);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_DOWN);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_LEFT);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_RIGHT);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_O);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_E);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_M);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_L);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_W);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_S);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_V);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_Z);
input_set_capability(input_dev, EV_KEY, KEY_GESTURE_C);
__set_bit(KEY_GESTURE_RIGHT, input_dev->keybit);
__set_bit(KEY_GESTURE_LEFT, input_dev->keybit);
__set_bit(KEY_GESTURE_UP, input_dev->keybit);
__set_bit(KEY_GESTURE_DOWN, input_dev->keybit);
__set_bit(KEY_GESTURE_U, input_dev->keybit);
__set_bit(KEY_GESTURE_O, input_dev->keybit);
__set_bit(KEY_GESTURE_E, input_dev->keybit);
__set_bit(KEY_GESTURE_M, input_dev->keybit);
__set_bit(KEY_GESTURE_W, input_dev->keybit);
__set_bit(KEY_GESTURE_L, input_dev->keybit);
__set_bit(KEY_GESTURE_S, input_dev->keybit);
__set_bit(KEY_GESTURE_V, input_dev->keybit);
__set_bit(KEY_GESTURE_C, input_dev->keybit);
__set_bit(KEY_GESTURE_Z, input_dev->keybit);
fts_create_gesture_sysfs(ts_data->dev);
memset(&fts_gesture_data, 0, sizeof(struct fts_gesture_st));
ts_data->gesture_mode = FTS_GESTURE_EN;
FTS_FUNC_EXIT();
return 0;
}
int fts_gesture_exit(struct fts_ts_data *ts_data)
{
FTS_FUNC_ENTER();
sysfs_remove_group(&ts_data->dev->kobj, &fts_gesture_group);
FTS_FUNC_EXIT();
return 0;
}

View file

@ -0,0 +1,193 @@
/*
*
* FocalTech TouchScreen driver.
*
* Copyright (c) 2012-2020, FocalTech Systems, Ltd., all rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
/************************************************************************
*
* File Name: focaltech_i2c.c
*
* Author: Focaltech Driver Team
*
* Created: 2016-08-04
*
* Abstract: i2c communication with TP
*
* Version: v1.0
*
* Revision History:
*
************************************************************************/
/*****************************************************************************
* Included header files
*****************************************************************************/
#include "focaltech_core.h"
/*****************************************************************************
* Private constant and macro definitions using #define
*****************************************************************************/
#define I2C_RETRY_NUMBER 3
#define I2C_BUF_LENGTH 256
/*****************************************************************************
* Private enumerations, structures and unions using typedef
*****************************************************************************/
/*****************************************************************************
* Static variables
*****************************************************************************/
/*****************************************************************************
* Global variable or extern global variabls/functions
*****************************************************************************/
/*****************************************************************************
* Static function prototypes
*****************************************************************************/
/*****************************************************************************
* functions body
*****************************************************************************/
int fts_read(u8 *cmd, u32 cmdlen, u8 *data, u32 datalen)
{
int ret = 0;
int i = 0;
struct fts_ts_data *ts_data = fts_data;
struct i2c_msg msg_list[2];
struct i2c_msg *msg = NULL;
int msg_num = 0;
/* must have data when read */
if (!ts_data || !ts_data->client || !data || !datalen
|| (datalen > I2C_BUF_LENGTH) || (cmdlen > I2C_BUF_LENGTH)) {
FTS_ERROR("fts_data/client/cmdlen(%d)/data/datalen(%d) is invalid",
cmdlen, datalen);
return -EINVAL;
}
mutex_lock(&ts_data->bus_lock);
memset(&msg_list[0], 0, sizeof(struct i2c_msg));
memset(&msg_list[1], 0, sizeof(struct i2c_msg));
memcpy(ts_data->bus_tx_buf, cmd, cmdlen);
msg_list[0].addr = ts_data->client->addr;
msg_list[0].flags = 0;
msg_list[0].len = cmdlen;
msg_list[0].buf = ts_data->bus_tx_buf;
msg_list[1].addr = ts_data->client->addr;
msg_list[1].flags = I2C_M_RD;
msg_list[1].len = datalen;
msg_list[1].buf = ts_data->bus_rx_buf;
if (cmd && cmdlen) {
msg = &msg_list[0];
msg_num = 2;
} else {
msg = &msg_list[1];
msg_num = 1;
}
for (i = 0; i < I2C_RETRY_NUMBER; i++) {
ret = i2c_transfer(ts_data->client->adapter, msg, msg_num);
if (ret < 0) {
FTS_ERROR("i2c_transfer(read) fail,ret:%d", ret);
} else {
memcpy(data, ts_data->bus_rx_buf, datalen);
break;
}
}
mutex_unlock(&ts_data->bus_lock);
return ret;
}
int fts_write(u8 *writebuf, u32 writelen)
{
int ret = 0;
int i = 0;
struct fts_ts_data *ts_data = fts_data;
struct i2c_msg msgs;
if (!ts_data || !ts_data->client || !writebuf || !writelen
|| (writelen > I2C_BUF_LENGTH)) {
FTS_ERROR("fts_data/client/data/datalen(%d) is invalid", writelen);
return -EINVAL;
}
mutex_lock(&ts_data->bus_lock);
memset(&msgs, 0, sizeof(struct i2c_msg));
memcpy(ts_data->bus_tx_buf, writebuf, writelen);
msgs.addr = ts_data->client->addr;
msgs.flags = 0;
msgs.len = writelen;
msgs.buf = ts_data->bus_tx_buf;
for (i = 0; i < I2C_RETRY_NUMBER; i++) {
ret = i2c_transfer(ts_data->client->adapter, &msgs, 1);
if (ret < 0) {
FTS_ERROR("i2c_transfer(write) fail,ret:%d", ret);
} else {
break;
}
}
mutex_unlock(&ts_data->bus_lock);
return ret;
}
int fts_read_reg(u8 addr, u8 *value)
{
return fts_read(&addr, 1, value, 1);
}
int fts_write_reg(u8 addr, u8 value)
{
u8 buf[2] = { 0 };
buf[0] = addr;
buf[1] = value;
return fts_write(buf, sizeof(buf));
}
int fts_bus_init(struct fts_ts_data *ts_data)
{
FTS_FUNC_ENTER();
ts_data->bus_tx_buf = kzalloc(I2C_BUF_LENGTH, GFP_KERNEL);
if (NULL == ts_data->bus_tx_buf) {
FTS_ERROR("failed to allocate memory for bus_tx_buf");
return -ENOMEM;
}
ts_data->bus_rx_buf = kzalloc(I2C_BUF_LENGTH, GFP_KERNEL);
if (NULL == ts_data->bus_rx_buf) {
FTS_ERROR("failed to allocate memory for bus_rx_buf");
return -ENOMEM;
}
FTS_FUNC_EXIT();
return 0;
}
int fts_bus_exit(struct fts_ts_data *ts_data)
{
FTS_FUNC_ENTER();
if (ts_data && ts_data->bus_tx_buf) {
kfree(ts_data->bus_tx_buf);
ts_data->bus_tx_buf = NULL;
}
if (ts_data && ts_data->bus_rx_buf) {
kfree(ts_data->bus_rx_buf);
ts_data->bus_rx_buf = NULL;
}
FTS_FUNC_EXIT();
return 0;
}

View file

@ -0,0 +1,129 @@
/*
*
* FocalTech TouchScreen driver.
*
* Copyright (c) 2012-2020, FocalTech Systems, Ltd., all rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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.
*
*/
/*****************************************************************************
*
* File Name: focaltech_point_report_check.c
*
* Author: Focaltech Driver Team
*
* Created: 2016-11-16
*
* Abstract: point report check function
*
* Version: v1.0
*
* Revision History:
*
*****************************************************************************/
/*****************************************************************************
* Included header files
*****************************************************************************/
#include "focaltech_core.h"
#if FTS_POINT_REPORT_CHECK_EN
/*****************************************************************************
* Private constant and macro definitions using #define
*****************************************************************************/
#define POINT_REPORT_CHECK_WAIT_TIME 200 /* unit:ms */
#define PRC_INTR_INTERVALS 100 /* unit:ms */
/*****************************************************************************
* functions body
*****************************************************************************/
/*****************************************************************************
* Name: fts_prc_func
* Brief: fts point report check work func, report whole up of points
* Input:
* Output:
* Return:
*****************************************************************************/
static void fts_prc_func(struct work_struct *work)
{
struct fts_ts_data *ts_data = container_of(work,
struct fts_ts_data, prc_work.work);
unsigned long cur_jiffies = jiffies;
unsigned long intr_timeout = msecs_to_jiffies(PRC_INTR_INTERVALS);
intr_timeout += ts_data->intr_jiffies;
if (time_after(cur_jiffies, intr_timeout)) {
fts_release_all_finger();
ts_data->prc_mode = 0;
//FTS_DEBUG("interval:%lu", (cur_jiffies - ts_data->intr_jiffies) * 1000 / HZ);
} else {
queue_delayed_work(ts_data->ts_workqueue, &ts_data->prc_work,
msecs_to_jiffies(POINT_REPORT_CHECK_WAIT_TIME));
ts_data->prc_mode = 1;
}
}
/*****************************************************************************
* Name: fts_prc_queue_work
* Brief: fts point report check queue work, call it when interrupt comes
* Input:
* Output:
* Return:
*****************************************************************************/
void fts_prc_queue_work(struct fts_ts_data *ts_data)
{
ts_data->intr_jiffies = jiffies;
if (!ts_data->prc_mode) {
queue_delayed_work(ts_data->ts_workqueue, &ts_data->prc_work,
msecs_to_jiffies(POINT_REPORT_CHECK_WAIT_TIME));
ts_data->prc_mode = 1;
}
}
/*****************************************************************************
* Name: fts_point_report_check_init
* Brief:
* Input:
* Output:
* Return: < 0: Fail to create esd check queue
*****************************************************************************/
int fts_point_report_check_init(struct fts_ts_data *ts_data)
{
FTS_FUNC_ENTER();
if (ts_data->ts_workqueue) {
INIT_DELAYED_WORK(&ts_data->prc_work, fts_prc_func);
} else {
FTS_ERROR("fts workqueue is NULL, can't run point report check function");
return -EINVAL;
}
FTS_FUNC_EXIT();
return 0;
}
/*****************************************************************************
* Name: fts_point_report_check_exit
* Brief:
* Input:
* Output:
* Return:
*****************************************************************************/
int fts_point_report_check_exit(struct fts_ts_data *ts_data)
{
FTS_FUNC_ENTER();
FTS_FUNC_EXIT();
return 0;
}
#endif /* FTS_POINT_REPORT_CHECK_EN */

View file

@ -0,0 +1,3 @@
obj-$(CONFIG_TOUCHSCREEN_FT3519) += focaltech_test.o
obj-$(CONFIG_TOUCHSCREEN_FT3519) += focaltech_test_ini.o
obj-$(CONFIG_TOUCHSCREEN_FT3519) += supported_ic/

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,648 @@
/************************************************************************
* Copyright (c) 2012-2020, FocalTech Systems, Ltd., all rights reserved.
*
* File Name: focaltech_test.h
*
* Author: Focaltech Driver Team
*
* Created: 2016-08-01
*
* Abstract: test entry for all IC
*
************************************************************************/
#ifndef _TEST_LIB_H
#define _TEST_LIB_H
/*****************************************************************************
* Included header files
*****************************************************************************/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/debugfs.h>
#include <asm/uaccess.h>
#include <linux/i2c.h>//iic
#include <linux/delay.h>//msleep
#include <linux/string.h>
#include <asm/unistd.h>
#include <linux/vmalloc.h>
#include <linux/time.h>
#include "../focaltech_core.h"
#include "focaltech_test_ini.h"
/*****************************************************************************
* Macro definitions using #define
*****************************************************************************/
#define FTS_INI_FILE_PATH "/mnt/sdcard/"
#define FTS_CSV_FILE_NAME "testdata.csv"
#define FTS_TXT_FILE_NAME "testresult.txt"
#define false 0
#define true 1
#define TEST_ICSERIES_LEN (8)
#define TEST_ICSERIES(x) ((x) >> TEST_ICSERIES_LEN)
#define TEST_OPEN_MAX_VALUE (255)
#define BYTES_PER_TIME (32) /* max:128 */
/* CSV & TXT */
#define CSV_LINE2_BUFFER_LEN (1024)
#define CSV_BUFFER_LEN (1024*80*5)
#define TXT_BUFFER_LEN (1024*80*5)
#define TEST_SAVE_FAIL_RESULT 0
/*-----------------------------------------------------------
Test Status
-----------------------------------------------------------*/
#define RESULT_NULL 0
#define RESULT_PASS 1
#define RESULT_NG 2
#define TX_NUM_MAX 60
#define RX_NUM_MAX 100
#define SC_NUM_MAX ((TX_NUM_MAX) + (RX_NUM_MAX))
#define NUM_MAX_SC (144)
#define KEY_NUM_MAX 6
#define TEST_ITEM_COUNT_MAX 32
#define TEST_ITEM_NAME_MAX 32
#define TEST_SHORT_RES_MAX 0xFFFF
/*
* factory test registers
*/
#define ENTER_WORK_FACTORY_RETRIES 5
#define START_SCAN_RETRIES_INCELL 20
#define START_SCAN_RETRIES_DELAY_INCELL 16
#define FACTORY_TEST_RETRY 50
#define FACTORY_TEST_DELAY 18
#define FACTORY_TEST_RETRY_DELAY 100
#define DEVIDE_MODE_ADDR 0x00
#define REG_FW_VERSION 0xA6
#define REG_VA_TOUCH_THR 0x80
#define REG_VKEY_TOUCH_THR 0x82
#define FACTORY_REG_LINE_ADDR 0x01
#define FACTORY_REG_CHX_NUM 0x02
#define FACTORY_REG_CHY_NUM 0x03
#define FACTORY_REG_CLB 0x04
#define FACTORY_REG_DATA_SELECT 0x06
#define FACTORY_REG_RAWBUF_SELECT 0x09
#define FACTORY_REG_KEY_CBWIDTH 0x0B
#define FACTORY_REG_PARAM_UPDATE_STATE 0x0E
#define FACTORY_REG_SHORT_TEST_EN 0x0F
#define FACTORY_REG_SHORT_TEST_STATE 0x10
#define FACTORY_REG_LCD_NOISE_START 0x11
#define FACTORY_REG_LCD_NOISE_FRAME 0x12
#define FACTORY_REG_LCD_NOISE_TEST_STATE 0x13
#define FACTORY_REG_LCD_NOISE_TTHR 0x14
#define FACTORY_REG_OPEN_START 0x15
#define FACTORY_REG_OPEN_STATE 0x16
#define FACTORY_REG_OPEN_ADDR 0xCF
#define FACTORY_REG_OPEN_IDLE 0x03
#define FACTORY_REG_OPEN_BUSY 0x01
#define FACTORY_REG_CB_ADDR_H 0x18
#define FACTORY_REG_CB_ADDR_L 0x19
#define FACTORY_REG_ORDER_ADDR_H 0x1A
#define FACTORY_REG_ORDER_ADDR_L 0x1B
#define FACTORY_REG_LCD_NOISE_STATE 0x1E
#define FACTORY_REG_KEYSHORT_EN 0x2E
#define FACTORY_REG_KEYSHORT_STATE 0x2F
#define FACTORY_REG_LEFT_KEY 0x1E
#define FACTORY_REG_RIGHT_KEY 0x1F
#define FACTORY_REG_OPEN_REG20 0x20
#define FACTORY_REG_OPEN_REG21 0x21
#define FACTORY_REG_OPEN_REG22 0x22
#define FACTORY_REG_OPEN_REG23 0x23
#define FACTORY_REG_OPEN_REG2E 0x2E
#define FACTORY_REG_OPEN_REG86 0x86
#define FACTORY_REG_K1 0x31
#define FACTORY_REG_K2 0x32
#define FACTORY_REG_RAWDATA_ADDR 0x6A
#define FACTORY_REG_ORDER_ADDR 0x6C
#define FACTORY_REG_CB_ADDR 0x6E
#define FACTORY_REG_SHORT_ADDR 0x89
#define FACTORY_REG_RAWDATA_TEST_EN 0x9E
#define FACTORY_REG_CB_TEST_EN 0x9F
#define FACTORY_REG_OPEN_TEST_EN 0xA0
#define FACTORY_REG_RAWDATA_TARGET 0xCA
/* mc_sc */
#define FACTORY_REG_FRE_LIST 0x0A
#define FACTORY_REG_DATA_TYPE 0x5B
#define FACTORY_REG_NORMALIZE 0x16
#define FACTORY_REG_RAWDATA_ADDR_MC_SC 0x36
#define FACTORY_REG_PATTERN 0x53
#define FACTORY_REG_NOMAPPING 0x54
#define FACTORY_REG_CHX_NUM_NOMAP 0x55
#define FACTORY_REG_CHY_NUM_NOMAP 0x56
#define FACTORY_REG_WC_SEL 0x09
#define FACTORY_REG_HC_SEL 0x0F
#define FACTORY_REG_MC_SC_MODE 0x44
#define FACTORY_REG_MC_SC_CB_ADDR_OFF 0x45
#define FACTORY_REG_MC_SC_CB_H_ADDR_OFF 0x49
#define FACTORY_REG_MC_SC_CB_ADDR 0x4E
#define FACTROY_REG_SHORT_TEST_EN 0x07
#define FACTROY_REG_SHORT_CA 0x01
#define FACTROY_REG_SHORT_CC 0x02
#define FACTROY_REG_SHORT_CG 0x03
#define FACTROY_REG_SHORT_OFFSET 0x04
#define FACTROY_REG_SHORT_AB_CH 0x58
#define FACTROY_REG_SHORT_RES_LEVEL 0x5A
#define FACTORY_REG_SHORT_ADDR_MC 0xF4
#define FACTORY_REG_FIR 0xFB
#define FACTROY_REG_SHORT2_TEST_EN 0xC0
#define FACTROY_REG_SHORT2_CA 0x01
#define FACTROY_REG_SHORT2_CC 0x02
#define FACTROY_REG_SHORT2_CG 0x03
#define FACTROY_REG_SHORT2_OFFSET 0x04
#define FACTROY_REG_SHORT2_RES_LEVEL 0xC1
#define FACTROY_REG_SHORT2_DEALY 0xC2
#define FACTROY_REG_SHORT2_TEST_STATE 0xC3
#define FACTORY_REG_SHORT2_ADDR_MC 0xC4
#define FACTROY_REG_SHORT2_AB_CH 0xC6
/* sc */
#define FACTORY_REG_SCAN_ADDR2 0x08
#define FACTORY_REG_CH_NUM_SC 0x0A
#define FACTORY_REG_KEY_NUM_SC 0x0B
#define FACTORY_REG_SC_CB_ADDR_OFF 0x33
#define FACTORY_REG_SC_CB_ADDR 0x39
#define FACTORY_REG_RAWDATA_SADDR_SC 0x34
#define FACTORY_REG_RAWDATA_ADDR_SC 0x35
#define FACTORY_REG_CB_SEL 0x41
#define FACTORY_REG_FMODE 0xAE
#define TEST_RETVAL_00 0x00
#define TEST_RETVAL_AA 0xAA
#define FTS_MAX_SORT_SC 32768
#define FTS_MIN_SORT_SC 0
/*****************************************************************************
* enumerations, structures and unions
*****************************************************************************/
struct item_info {
char name[TEST_ITEM_NAME_MAX];
int code;
int *data;
int datalen;
int result;
int mc_sc;
int key_support;
};
struct fts_test_data {
int item_count;
struct item_info info[TEST_ITEM_COUNT_MAX];
};
/* incell */
struct incell_testitem {
u32 short_test : 1;
u32 open_test : 1;
u32 cb_test : 1;
u32 rawdata_test : 1;
u32 lcdnoise_test : 1;
u32 keyshort_test : 1;
u32 mux_open_test : 1;
};
struct incell_threshold_b {
int short_res_min;
int short_res_vk_min;
int open_cb_min;
int open_k1_check;
int open_k1_value;
int open_k2_check;
int open_k2_value;
int cb_min;
int cb_max;
int cb_vkey_check;
int cb_min_vk;
int cb_max_vk;
int rawdata_min;
int rawdata_max;
int rawdata_vkey_check;
int rawdata_min_vk;
int rawdata_max_vk;
int lcdnoise_frame;
int lcdnoise_coefficient;
int lcdnoise_coefficient_vkey;
int open_diff_min;
int open_nmos;
int keyshort_k1;
int keyshort_cb_max;
int rawdata2_min;
int rawdata2_max;
int mux_open_cb_min;
int open_delta_V;
};
struct incell_threshold {
struct incell_threshold_b basic;
int *rawdata_min;
int *rawdata_max;
int *rawdata2_min;
int *rawdata2_max;
int *cb_min;
int *cb_max;
};
struct incell_test {
struct incell_threshold thr;
union {
int tmp;
struct incell_testitem item;
} u;
};
/* mc_sc */
enum mapping_type {
MAPPING = 0,
NO_MAPPING = 1,
};
struct mc_sc_testitem {
u32 rawdata_test : 1;
u32 rawdata_uniformity_test : 1;
u32 scap_cb_test : 1;
u32 scap_rawdata_test : 1;
u32 short_test : 1;
u32 panel_differ_test : 1;
};
struct mc_sc_threshold_b {
int rawdata_h_min;
int rawdata_h_max;
int rawdata_set_hfreq;
int rawdata_l_min;
int rawdata_l_max;
int rawdata_set_lfreq;
int uniformity_check_tx;
int uniformity_check_rx;
int uniformity_check_min_max;
int uniformity_tx_hole;
int uniformity_rx_hole;
int uniformity_min_max_hole;
int scap_cb_off_min;
int scap_cb_off_max;
int scap_cb_wp_off_check;
int scap_cb_on_min;
int scap_cb_on_max;
int scap_cb_wp_on_check;
int scap_rawdata_off_min;
int scap_rawdata_off_max;
int scap_rawdata_wp_off_check;
int scap_rawdata_on_min;
int scap_rawdata_on_max;
int scap_rawdata_wp_on_check;
int short_cg;
int short_cc;
int panel_differ_min;
int panel_differ_max;
int scap_cb_hi_min;
int scap_cb_hi_max;
int scap_cb_hi_check;
int scap_rawdata_hi_min;
int scap_rawdata_hi_max;
int scap_rawdata_hi_check;
int scap_cb_hov_min;
int scap_cb_hov_max;
int scap_cb_hov_check;
int scap_rawdata_hov_min;
int scap_rawdata_hov_max;
int scap_rawdata_hov_check;
};
struct mc_sc_threshold {
struct mc_sc_threshold_b basic;
int *rawdata_h_min;
int *rawdata_h_max;
int *rawdata_l_min;
int *rawdata_l_max;
int *tx_linearity_max;
int *tx_linearity_min;
int *rx_linearity_max;
int *rx_linearity_min;
int *scap_cb_off_min;
int *scap_cb_off_max;
int *scap_cb_on_min;
int *scap_cb_on_max;
int *scap_cb_hi_min;
int *scap_cb_hi_max;
int *scap_cb_hov_min;
int *scap_cb_hov_max;
int *scap_rawdata_off_min;
int *scap_rawdata_off_max;
int *scap_rawdata_on_min;
int *scap_rawdata_on_max;
int *scap_rawdata_hi_min;
int *scap_rawdata_hi_max;
int *scap_rawdata_hov_min;
int *scap_rawdata_hov_max;
int *panel_differ_min;
int *panel_differ_max;
};
struct mc_sc_test {
struct mc_sc_threshold thr;
union {
u32 tmp;
struct mc_sc_testitem item;
} u;
};
/* sc */
struct sc_testitem {
u32 rawdata_test : 1;
u32 cb_test : 1;
u32 delta_cb_test : 1;
u32 short_test : 1;
};
struct sc_threshold_b {
int rawdata_min;
int rawdata_max;
int cb_min;
int cb_max;
int dcb_base;
int dcb_differ_max;
int dcb_key_check;
int dcb_key_differ_max;
int dcb_ds1;
int dcb_ds2;
int dcb_ds3;
int dcb_ds4;
int dcb_ds5;
int dcb_ds6;
int dcb_critical_check;
int dcb_cs1;
int dcb_cs2;
int dcb_cs3;
int dcb_cs4;
int dcb_cs5;
int dcb_cs6;
int short_min;
};
struct sc_threshold {
struct sc_threshold_b basic;
int *rawdata_min;
int *rawdata_max;
int *cb_min;
int *cb_max;
int *dcb_sort;
int *dcb_base;
};
struct sc_test {
struct sc_threshold thr;
union {
u32 tmp;
struct sc_testitem item;
} u;
};
enum test_hw_type {
IC_HW_INCELL = 1,
IC_HW_MC_SC,
IC_HW_SC,
};
enum test_scan_mode {
SCAN_NORMAL = 0,
SCAN_SC,
};
struct fts_test_node {
int channel_num;
int tx_num;
int rx_num;
int node_num;
int key_num;
};
struct fts_test {
struct fts_ts_data *ts_data;
struct fts_test_node node;
struct fts_test_node sc_node;
u8 fw_ver;
u8 va_touch_thr;
u8 vk_touch_thr;
bool key_support;
bool v3_pattern;
u8 mapping;
u8 normalize;
int test_num;
int *buffer;
int buffer_length;
int *node_valid;
int *node_valid_sc;
int basic_thr_count;
int code1;
int code2;
int offset;
union {
struct incell_test incell;
struct mc_sc_test mc_sc;
struct sc_test sc;
} ic;
struct test_funcs *func;
struct fts_test_data testdata;
char *testresult;
int testresult_len;
int result;
#if defined(TEST_SAVE_FAIL_RESULT) && TEST_SAVE_FAIL_RESULT
struct timeval tv;
#endif
struct ini_data ini;
};
struct test_funcs {
u16 ctype[FTS_MAX_COMPATIBLE_TYPE];
enum test_hw_type hwtype;
int startscan_mode;
int key_num_total;
bool rawdata2_support;
bool force_touch;
bool mc_sc_short_v2;
bool raw_u16;
bool cb_high_support;
int (*param_init)(void);
int (*init)(void);
int (*start_test)(void);
};
enum byte_mode {
DATA_ONE_BYTE,
DATA_TWO_BYTE,
};
/* mc_sc */
enum normalize_type {
NORMALIZE_OVERALL,
NORMALIZE_AUTO,
};
enum wp_type {
WATER_PROOF_OFF = 0,
WATER_PROOF_ON = 1,
HIGH_SENSITIVITY = 2,
HOV = 3,
WATER_PROOF_ON_TX = 100,
WATER_PROOF_ON_RX,
WATER_PROOF_OFF_TX,
WATER_PROOF_OFF_RX,
};
/* mc end */
/* sc */
enum factory_mode {
FACTORY_NORMAL,
FACTORY_TESTMODE_1,
FACTORY_TESTMODE_2,
};
enum dcb_sort_num {
DCB_SORT_MIN = 1,
DCB_SORT_MAX = 6,
};
struct dcb_sort_d {
int ch_num;
int deviation;
int critical;
int min;
int max;
};
/* sc end */
enum csv_itemcode_incell {
CODE_ENTER_FACTORY_MODE = 0,
CODE_RAWDATA_TEST = 7,
CODE_CB_TEST = 12,
CODE_SHORT_TEST = 15,
CODE_OPEN_TEST = 25,
CODE_LCD_NOISE_TEST = 27,
CODE_MUX_OPEN_TEST = 41,
};
enum csv_itemcode_mc_sc {
CODE_M_RAWDATA_TEST = 7,
CODE_M_SCAP_CB_TEST = 9,
CODE_M_SCAP_RAWDATA_TEST = 10,
CODE_M_WEAK_SHORT_CIRCUIT_TEST = 15,
CODE_M_RAWDATA_UNIFORMITY_TEST = 16,
CODE_M_PANELDIFFER_TEST = 20,
};
enum csv_itemcode_sc {
CODE_S_RAWDATA_TEST = 7,
CODE_S_CB_TEST = 13,
CODE_S_DCB_TEST = 14,
};
/*****************************************************************************
* Global variable or extern global variabls/functions
*****************************************************************************/
extern struct test_funcs test_func_ft5452i;
extern struct fts_test *fts_ftest;
void sys_delay(int ms);
int fts_abs(int value);
void print_buffer(int *buffer, int length, int line_num);
int fts_test_read_reg(u8 addr, u8 *val);
int fts_test_write_reg(u8 addr, u8 val);
int fts_test_read(u8 addr, u8 *readbuf, int readlen);
int fts_test_write(u8 addr, u8 *writebuf, int writelen);
int enter_work_mode(void);
int enter_factory_mode(void);
int read_mass_data(u8 addr, int byte_num, int *buf);
int chip_clb(void);
int wait_state_update(u8 retval);
int get_cb_incell(u16 saddr, int byte_num, int *cb_buf);
int short_get_adcdata_incell(u8 retval, u8 ch_num, int byte_num, int *adc_buf);
int start_scan(void);
int get_rawdata(int *data);
int get_cb_sc(int byte_num, int *cb_buf, enum byte_mode mode);
bool compare_data(int *data, int min, int max, int min_vk, int max_vk, bool key);
bool compare_array(int *data, int *min, int *max, bool key);
void show_data(int *data, bool key);
/* mc_sc */
int mapping_switch(u8 mapping);
bool get_fw_wp(u8 wp_channel_select, enum wp_type water_proof_type);
int get_cb_mc_sc(u8 wp, int byte_num, int *cb_buf, enum byte_mode mode);
int get_rawdata_mc_sc(enum wp_type wp, int *data);
int get_rawdata_mc(u8 fre, u8 fir, int *rawdata);
int short_get_adc_data_mc(u8 retval, int byte_num, int *adc_buf, u8 mode);
bool compare_mc_sc(bool, bool, int *, int *, int *);
void show_data_mc_sc(int *data);
void *fts_malloc(size_t size);
void fts_free_proc(void *p);
void fts_test_save_data(char *name, int code, int *data, int datacnt,
bool mc_sc, bool key, bool result);
#define fts_malloc_r(p, size) do {\
if (NULL == p) {\
p = fts_malloc(size);\
if (NULL == p) {\
return -ENOMEM;\
}\
}\
} while(0)
#define fts_free(p) do {\
if (p) {\
fts_free_proc(p);\
p = NULL;\
}\
} while(0)
#define CSV_SUPPORT 1
#define TXT_SUPPORT 1
#define FTS_TEST_DBG(fmt, args...) do { \
printk("[FTS_TS][TEST]%s:"fmt"\n", __func__, ##args); \
} while (0)
#define FTS_TEST_FUNC_ENTER() do { \
printk("[FTS_TS][TEST]%s: Enter\n", __func__); \
} while (0)
#define FTS_TEST_FUNC_EXIT() do { \
printk("[FTS_TS][TEST]%s: Exit(%d)\n", __func__, __LINE__); \
} while (0)
#define FTS_TEST_INFO(fmt, args...) do { \
printk(KERN_ERR "[FTS_TS/I][TEST]%s:"fmt"\n", __func__, ##args); \
} while (0)
#define FTS_TEST_ERROR(fmt, args...) do { \
printk(KERN_ERR "[FTS_TS/E][TEST]%s:"fmt"\n", __func__, ##args); \
} while (0)
#define FTS_TEST_SAVE_INFO(fmt, args...) do { \
if (fts_ftest->testresult) { \
fts_ftest->testresult_len += snprintf( \
fts_ftest->testresult + fts_ftest->testresult_len, \
TXT_BUFFER_LEN, \
fmt, ##args);\
} \
} while (0)
#define FTS_TEST_SAVE_ERR(fmt, args...) do { \
if (fts_ftest->testresult && (fts_ftest->testresult_len < TXT_BUFFER_LEN)) { \
fts_ftest->testresult_len += snprintf( \
fts_ftest->testresult + fts_ftest->testresult_len, \
TXT_BUFFER_LEN, \
fmt, ##args);\
} \
printk(KERN_ERR "[FTS_TS/E][TEST]%s:"fmt"\n", __func__, ##args);\
} while (0)
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,146 @@
/************************************************************************
* Copyright (c) 2012-2020, Focaltech Systems (R)£¬All Rights Reserved.
*
* File Name: focaltech_test_ini.h
*
* Author: Focaltech Driver Team
*
* Created: 2016-08-01
*
* Abstract: parsing function of INI file
*
************************************************************************/
#ifndef _INI_H
#define _INI_H
/*****************************************************************************
* Private constant and macro definitions using #define
*****************************************************************************/
#define MAX_KEYWORD_NUM (1000)
#define MAX_KEYWORD_NAME_LEN (50)
#define MAX_KEYWORD_VALUE_LEN (512)
#define MAX_KEYWORD_VALUE_ONE_LEN (16)
#define MAX_INI_LINE_LEN (MAX_KEYWORD_NAME_LEN + MAX_KEYWORD_VALUE_LEN)
#define MAX_INI_SECTION_NUM (20)
#define MAX_IC_NAME_LEN (32)
#define MAX_TEST_ITEM (20)
#define IC_CODE_OFFSET (16)
/*****************************************************************************
* enumerations, structures and unions
*****************************************************************************/
struct ini_ic_type {
char ic_name[MAX_IC_NAME_LEN];
u32 ic_type;
};
enum line_type {
LINE_SECTION = 1,
LINE_KEYWORD = 2 ,
LINE_OTHER = 3,
};
struct ini_keyword {
char name[MAX_KEYWORD_NAME_LEN];
char value[MAX_KEYWORD_VALUE_LEN];
};
struct ini_section {
char name[MAX_KEYWORD_NAME_LEN];
int keyword_num;
/* point to ini.tmp, don't need free */
struct ini_keyword *keyword;
};
struct ini_data {
char *data;
int length;
int keyword_num_total;
int section_num;
struct ini_section section[MAX_INI_SECTION_NUM];
struct ini_keyword *tmp;
char ic_name[MAX_IC_NAME_LEN];
u32 ic_code;
};
#define TEST_ITEM_INCELL { \
"SHORT_CIRCUIT_TEST", \
"OPEN_TEST", \
"CB_TEST", \
"RAWDATA_TEST", \
"LCD_NOISE_TEST", \
"KEY_SHORT_TEST", \
"MUX_OPEN_TEST", \
}
#define BASIC_THRESHOLD_INCELL { \
"ShortCircuit_ResMin", "ShortCircuit_VkResMin", \
"OpenTest_CBMin", "OpenTest_Check_K1", "OpenTest_K1Threshold", "OpenTest_Check_K2", "OpenTest_K2Threshold", \
"CBTest_Min", "CBTest_Max", \
"CBTest_VKey_Check", "CBTest_Min_Vkey", "CBTest_Max_Vkey", \
"RawDataTest_Min", "RawDataTest_Max", \
"RawDataTest_VKey_Check", "RawDataTest_Min_VKey", "RawDataTest_Max_VKey", \
"LCD_NoiseTest_Frame", "LCD_NoiseTest_Coefficient", "LCD_NoiseTest_Coefficient_key", \
"OpenTest_DifferMin", \
}
#define TEST_ITEM_MC_SC { \
"RAWDATA_TEST", \
"UNIFORMITY_TEST", \
"SCAP_CB_TEST", \
"SCAP_RAWDATA_TEST", \
"WEAK_SHORT_CIRCUIT_TEST", \
"PANEL_DIFFER_TEST", \
}
#define BASIC_THRESHOLD_MC_SC { \
"RawDataTest_High_Min", "RawDataTest_High_Max", "RawDataTest_HighFreq", \
"RawDataTest_Low_Min", "RawDataTest_Low_Max", "RawDataTest_LowFreq", \
"UniformityTest_Check_Tx", "UniformityTest_Check_Rx","UniformityTest_Check_MinMax", \
"UniformityTest_Tx_Hole", "UniformityTest_Rx_Hole", "UniformityTest_MinMax_Hole", \
"SCapCbTest_OFF_Min", "SCapCbTest_OFF_Max", "ScapCBTest_SetWaterproof_OFF", \
"SCapCbTest_ON_Min", "SCapCbTest_ON_Max", "ScapCBTest_SetWaterproof_ON", \
"SCapRawDataTest_OFF_Min", "SCapRawDataTest_OFF_Max", "SCapRawDataTest_SetWaterproof_OFF", \
"SCapRawDataTest_ON_Min", "SCapRawDataTest_ON_Max", "SCapRawDataTest_SetWaterproof_ON", \
"WeakShortTest_CG", "WeakShortTest_CC", \
"PanelDifferTest_Min", "PanelDifferTest_Max", \
"SCapCbTest_High_Min", "SCapCbTest_High_Max", "ScapCBTest_SetHighSensitivity", \
"SCapRawDataTest_High_Min", "SCapRawDataTest_High_Max", "SCapRawDataTest_SetHighSensitivity", \
"SCapCbTest_Hov_Min", "SCapCbTest_Hov_Max", "ScapCBTest_SetHov", \
"SCapRawDataTest_Hov_Min", "SCapRawDataTest_Hov_Max", "SCapRawDataTest_SetHov", \
}
#define TEST_ITEM_SC { \
"RAWDATA_TEST", \
"CB_TEST", \
"DELTA_CB_TEST", \
"WEAK_SHORT_TEST", \
}
#define BASIC_THRESHOLD_SC { \
"RawDataTest_Min", "RawDataTest_Max", \
"CbTest_Min", "CbTest_Max", \
"DeltaCbTest_Base", "DeltaCbTest_Differ_Max", \
"DeltaCbTest_Include_Key_Test", "DeltaCbTest_Key_Differ_Max", \
"DeltaCbTest_Deviation_S1", "DeltaCbTest_Deviation_S2", "DeltaCbTest_Deviation_S3", \
"DeltaCbTest_Deviation_S4", "DeltaCbTest_Deviation_S5", "DeltaCbTest_Deviation_S6", \
"DeltaCbTest_Set_Critical", "DeltaCbTest_Critical_S1", "DeltaCbTest_Critical_S2", \
"DeltaCbTest_Critical_S3", "DeltaCbTest_Critical_S4", \
"DeltaCbTest_Critical_S5", "DeltaCbTest_Critical_S6", \
}
/*****************************************************************************
* Global variable or extern global variabls/functions
*****************************************************************************/
int fts_test_get_testparam_from_ini(char *config_name);
int get_keyword_value(char *section, char *name, int *value);
#define get_value_interface(name, value) \
get_keyword_value("Interface", name, value)
#define get_value_basic(name, value) \
get_keyword_value("Basic_Threshold", name, value)
#define get_value_detail(name, value) \
get_keyword_value("SpecialSet", name, value)
#define get_value_testitem(name, value) \
get_keyword_value("TestItem", name, value)
#endif /* _INI_H */

View file

@ -0,0 +1 @@
obj-$(CONFIG_TOUCHSCREEN_FT3519) += focaltech_test_ft5452i.o

View file

@ -0,0 +1,452 @@
0x2, 0x0, 0x46,0x32,0x0, 0x0, 0xb2,0x0, 0xff,0xff,0xff,0x2, 0x7, 0x45,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0x2, 0xd, 0x9a,0xff,0xff,0xff,0xff,0xff,0x2, 0xb, 0x91,0xff,0xff,
0xff,0xff,0xff,0x2, 0x0, 0x3, 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0x2, 0xb, 0xdb,0x75,0x84,0x1, 0x7e,0x44,0x1f,0xff,0xe4,0x7a,0x49,
0xb0,0x1b,0x44,0x78,0xf9,0x7e,0xf8,0x13,0xff,0xd2,0x7, 0xc2,0x8, 0xc2,0x9, 0x75,
0x22,0x0, 0x75,0x27,0xff,0xd2,0x0, 0xc2,0x2, 0xc2,0x3, 0xc2,0x4, 0xc2,0x6, 0x7e,
0x4, 0x0, 0xff,0x7e,0x14,0x1, 0x45,0xb, 0xa, 0x40,0x5d,0x44,0x68,0x1a,0x69,0x20,
0x0, 0x2, 0xb, 0xe, 0xb, 0x44,0x80,0xa, 0x7e,0xb, 0xb0,0x7a,0x29,0xb0,0xb, 0x24,
0xb, 0xc, 0x1b,0x44,0x78,0xf2,0x80,0xdf,0x2, 0x19,0x93,0x6d,0x0, 0x74,0x10,0x4d,
0x0, 0x78,0xb, 0x4d,0x22,0x78,0x27,0x8d,0x31,0x7d,0x12,0x6d,0x22,0x22,0x7d,0x43,
0x7d,0x32,0x6d,0x22,0x2f,0x11,0x2d,0x44,0x50,0x2, 0xa5,0xf, 0xbf,0x10,0x40,0x4,
0x9f,0x10,0xb, 0x90,0x14,0x78,0xed,0x7f,0x1, 0x6d,0x22,0x7d,0x34,0x22,0x7d,0x41,
0x7d,0x13,0x8d,0x24,0x7d,0x2, 0x2f,0x0, 0x40,0x4, 0xbd,0x4, 0x40,0x4, 0x9d,0x4,
0xb, 0x14,0x14,0x78,0xf1,0x7d,0x23,0x7d,0x31,0x7d,0x10,0x6d,0x0, 0x22,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x1c,0x40,0xe3,0xbf,0x93,0x6c,0xdd,0x22,0xff,0x0, 0xff,0x0, 0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xca,0xf8,0x7f,0x20,0x80,0xa, 0x7e,0x1b,0xf0,0x7a,0x2b,0xf0,0xb, 0x34,0xb, 0x54,
0x69,0xff,0xff,0xfc,0x7d,0xef,0x1b,0xe4,0x79,0xef,0xff,0xfc,0x4d,0xff,0x78,0xe6,
0x7f,0x10,0xda,0xf8,0x22,0x0, 0x1, 0x2, 0x79,0x0, 0x0, 0xa, 0x2, 0x7a,0x54,0x5b,
0xaa,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0, 0x1, 0x2, 0x84,0x0, 0x0, 0x1, 0x2,
0x85,0xff,0x0, 0x2, 0x2, 0x86,0x0, 0x0, 0x0, 0x1, 0x3, 0x8c,0x0, 0x0, 0x1, 0x2,
0x44,0x0, 0x0, 0x1, 0x2, 0x46,0x0, 0x0, 0x2, 0x2, 0x61,0x0, 0x0, 0x0, 0x4, 0x2,
0x63,0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x2, 0x67,0x0, 0x0, 0x0, 0x1, 0x2, 0x69,0x0,
0x0, 0x1, 0x2, 0x6a,0xb, 0x0, 0x1, 0x2, 0x6b,0x0, 0x0, 0x0, 0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x56,0x31,0x2e,0x32,0x5f,0x41,0x70,0x72,0x20,0x32,0x37,0x20,0x32,0x30,0x32,0x31,
0x46,0x54,0x53,0x35,0x34,0x35,0x32,0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x7c,0x97,0x7c,0x8b,0x7f,0x70,0xd2,0xc9,0x7a,0x81,0xf2,0x75,0xf3,0x80,0xa, 0x59,
0x1b,0x54,0xf5,0xf4,0x75,0xf5,0x1, 0x6c,0xaa,0x80,0x14,0xe5,0xf5,0x54,0x80,0xb4,
0x80,0xf9,0xe5,0xf6,0xa, 0x3a,0x2d,0x3f,0x7d,0x2e,0x7a,0x1b,0xb0,0xb, 0xa0,0xbc,
0x9a,0x38,0xe8,0xc2,0xc9,0x22,0xd2,0xcf,0xe5,0xcc,0x54,0xf8,0xf5,0xcc,0xa9,0xd0,
0xce,0xa9,0xd2,0xc9,0xa9,0xd0,0xce,0xa9,0xd3,0xc9,0xa9,0xd5,0xca,0x75,0xeb,0x23,
0x75,0xed,0xf, 0x75,0xac,0x40,0x75,0xad,0x30,0xd2,0x86,0x75,0xec,0xff,0x75,0xee,
0xff,0xa9,0xc1,0xea,0xa9,0xc7,0x94,0xa9,0xc4,0x94,0xc2,0xae,0x7e,0x8, 0x0, 0xc,
0x74,0x21,0x7e,0x70,0x1, 0x91,0x20,0xe5,0xc, 0xbe,0xb0,0x9, 0x28,0x5, 0xa9,0xc3,
0xe2,0x80,0x3, 0xa9,0xd3,0xe2,0xe5,0xc, 0x7a,0xb3,0x2, 0x7d,0x22,0x7e,0x35,0x25,
0x7d,0x23,0x6d,0x33,0x2e,0x18,0x0, 0x8, 0x7a,0x1f,0x12,0xb0,0x7e,0x35,0x25,0x7d,
0x23,0x6d,0x33,0x2e,0x18,0x0, 0x8, 0x7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,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x7c,0xab,0x7e,0x70,0xef,0x7e,0xb3,0x2, 0x44,0x24,0xfd,0x68,0x5c,0x1b,0xb1,0x68,
0x48,0x24,0x9f,0x68,0x67,0x1b,0xb2,0x68,0x69,0x24,0xda,0x68,0x1f,0x24,0xc4,0x68,
0x53,0x1b,0xb2,0x68,0x51,0x24,0xf5,0x78,0x6e,0x7e,0xa3,0x2, 0x6e,0x7c,0xba,0x4,
0x7a,0xb3,0x2, 0x6e,0xa, 0x3a,0x9, 0x73,0x2, 0x51,0x80,0x5b,0x4c,0xaa,0x78,0x5,
0x7e,0x70,0x54,0x80,0x52,0xbe,0xa0,0x1, 0x78,0x5, 0x7e,0x70,0x5b,0x80,0x48,0xbe,
0xa0,0x2, 0x78,0x43,0x7e,0x70,0xaa,0x80,0x3e,0x4c,0xaa,0x78,0x2, 0x80,0x5, 0xbe,
0xa0,0x1, 0x78,0x33,0x7e,0x70,0x1, 0x80,0x2e,0xa, 0x3a,0x2e,0x35,0x25,0x9, 0x73,
0x0, 0xa, 0x80,0x23,0x80,0x6, 0x7e,0x73,0x3, 0x8c,0x80,0x1b,0x7e,0x73,0x2, 0x79,
0x80,0x15,0x4c,0xaa,0x78,0x8, 0x7e,0x37,0x2, 0x67,0xa, 0x36,0x80,0x9, 0xbe,0xa0,
0x1, 0x78,0x4, 0x7e,0x37,0x2, 0x67,0x7c,0xb7,0x22,0x7c,0x97,0x7c,0x8b,0xc2,0x2,
0x7e,0xb3,0x2, 0x44,0x14,0x78,0x2, 0x41,0xa2,0x1b,0xb1,0x78,0x2, 0x41,0x22,0x1b,
0xb1,0x78,0x2, 0x41,0xa2,0x1b,0xb1,0x78,0x2, 0x41,0x65,0x14,0x78,0x2, 0x41,0x81,
0x14,0x78,0x2, 0x41,0x87,0x24,0xf9,0x78,0x2, 0x41,0x9d,0x24,0xbb,0x68,0x55,0x24,
0xf6,0x78,0x2, 0x61,0x7e,0x1b,0xb1,0x78,0x2, 0x61,0x6c,0x14,0x78,0x2, 0x61,0x76,
0x1b,0xb1,0x78,0x2, 0x41,0xa5,0x14,0x78,0x2, 0x41,0xa7,0x14,0x78,0x2, 0x41,0xa2,
0x1b,0xb2,0x78,0x2, 0x41,0xa2,0x24,0xda,0x68,0x2e,0x24,0xe6,0x68,0x28,0x24,0xfa,
0x68,0x3f,0x24,0xf1,0x68,0x74,0x24,0xf3,0x78,0x2, 0x41,0xa2,0x24,0xec,0x78,0x2,
0x61,0x8c,0x24,0x5, 0x68,0x2, 0x61,0x90,0xbe,0x80,0x1, 0x68,0x2, 0x61,0x90,0x7a,
0x93,0x2, 0x6e,0x22,0x61,0x86,0x61,0x86,0xbe,0x80,0x4, 0x50,0xb, 0xe4,0x7a,0xb3,
0x2, 0x79,0xa, 0x58,0x19,0x95,0x2, 0x47,0x4c,0x88,0x68,0x2, 0x61,0x90,0xd2,0x2,
0x22,0x7c,0xb8,0x14,0x68,0xa, 0x14,0x68,0xf, 0x14,0x68,0x1e,0x24,0x3, 0x78,0x2a,
0xa, 0x39,0x7d,0x23,0x6d,0x33,0x80,0xc, 0x7c,0x29,0x6c,0x33,0x6d,0x0, 0x7e,0x1f,
0x2, 0x63,0x2f,0x10,0x7a,0x1f,0x2, 0x63,0x80,0x10,0xa, 0x19,0x6d,0x0, 0x7e,0x1f,
0x2, 0x63,0x2f,0x10,0x7a,0x1f,0x2, 0x63,0xd2,0x3, 0x7c,0xb8,0x14,0x68,0x19,0x14,
0x68,0x27,0x14,0x68,0x26,0x14,0x68,0x25,0x14,0x68,0x2a,0x24,0x5, 0x78,0x48,0x20,
0x1, 0x2, 0x41,0xcc,0x41,0xc6,0x41,0xcc,0xa, 0x39,0x7d,0x3, 0x6d,0x11,0x7e,0x35,
0x25,0x59,0x13,0x0, 0x2, 0x1b,0x38,0x0, 0x22,0x41,0xef,0x61,0x4, 0x7c,0x69,0x6c,
0x77,0x6d,0x22,0x61,0x1c,0xa, 0x59,0x6d,0x44,0x7e,0x25,0x25,0x7d,0x32,0xb, 0x36,
0x49,0x13,0x0, 0x2, 0xb, 0x38,0x0, 0x2f,0x2, 0x59,0x13,0x0, 0x2, 0x1b,0x38,0x0,
0x6d,0x33,0x59,0x32,0x0, 0x8, 0x22,0x7e,0xb3,0x2, 0x79,0x6c,0xb9,0x7a,0xb3,0x2,
0x79,0x7e,0x25,0x25,0x2e,0x24,0x0, 0x8, 0xb, 0x28,0x50,0x7d,0x35,0xb, 0x34,0x1b,
0x28,0x30,0x2e,0x55,0x25,0x19,0x95,0x0, 0xa, 0x7e,0x55,0x25,0x49,0x15,0x0, 0x8,
0x6d,0x0, 0x49,0x35,0x0, 0x6, 0x49,0x25,0x0, 0x4, 0xbf,0x1, 0x50,0x2, 0x61,0x90,
0x20,0x1, 0x3, 0xd3,0x80,0x1, 0xc3,0x92,0x1, 0x7a,0x55,0x23,0x7e,0x34,0x0, 0x2,
0x61,0x67,0x7c,0xb8,0x14,0x68,0x15,0x14,0x68,0x14,0x14,0x68,0x13,0x24,0x3, 0x68,
0x2, 0x61,0x90,0x20,0x1, 0x2, 0x41,0xcc,0x41,0xc6,0x41,0xcc,0x41,0xd4,0x41,0xef,
0xa, 0x59,0x6d,0x44,0x7e,0x15,0x25,0x49,0x31,0x0, 0x2, 0xb, 0x18,0x20,0x2f,0x12,
0x59,0x31,0x0, 0x2, 0x1b,0x18,0x20,0x7e,0x35,0x25,0x7a,0x35,0x23,0xd2,0x2, 0x7e,
0x34,0x0, 0x1, 0x61,0x67,0x75,0xe6,0x0, 0x75,0xe7,0x0, 0xe4,0x7e,0x34,0x1, 0x6,
0x7e,0x24,0x0, 0xff,0x7a,0x1b,0xb0,0x7e,0x34,0x1, 0x7, 0x7a,0x1b,0xb0,0xd2,0x6,
0x22,0x75,0xe6,0x0, 0xd2,0x9f,0x22,0xbe,0x80,0x1, 0x78,0x5, 0x7a,0x93,0x2, 0x6a,
0x22,0xbe,0x80,0x2, 0x68,0x2, 0x61,0x90,0x7a,0x93,0x2, 0x46,0x22,0x7a,0x93,0x2,
0x69,0x22,0xd2,0x2, 0x22,0x61,0x86,0x7c,0xb8,0x14,0x68,0x28,0x14,0x68,0x40,0x14,
0x68,0x52,0x14,0x68,0x61,0x14,0x68,0x70,0x14,0x78,0x2, 0x61,0x45,0x24,0x6, 0x68,
0x2, 0x61,0x90,0x30,0x1, 0x6, 0x7e,0x34,0x0, 0x28,0x80,0x4, 0x7e,0x34,0x1, 0x36,
0x7a,0x35,0x25,0x22,0xa, 0x39,0x6d,0x22,0x7e,0x15,0x25,0x59,0x31,0x0, 0x2, 0x1b,
0x18,0x20,0x49,0x31,0x0, 0x2, 0xb, 0x18,0x20,0x7d,0x23,0x6d,0x33,0x80,0x4e,0xa,
0x59,0x7c,0xab,0xe4,0x6d,0x44,0x7e,0x15,0x25,0x49,0x31,0x0, 0x2, 0xb, 0x18,0x20,
0x2f,0x12,0x80,0x39,0xa, 0x59,0x6d,0x44,0x7e,0x15,0x25,0x49,0x31,0x0, 0x2, 0xb,
0x18,0x20,0x2f,0x12,0x80,0x27,0xa, 0x39,0x7d,0x23,0x6d,0x33,0x7e,0x15,0x25,0x59,
0x31,0x0, 0x6, 0x59,0x21,0x0, 0x4, 0x22,0xa, 0x59,0x7c,0xab,0xe4,0x6d,0x44,0x7e,
0x15,0x25,0xb, 0x16,0x49,0x31,0x0, 0x2, 0xb, 0x18,0x20,0x2f,0x12,0x59,0x31,0x0,
0x2, 0x1b,0x18,0x20,0x22,0xa, 0x59,0x6d,0x44,0x7e,0x35,0x25,0x7d,0x23,0xb, 0x26,
0x49,0x12,0x0, 0x2, 0xb, 0x28,0x0, 0x2f,0x2, 0x59,0x12,0x0, 0x2, 0x1b,0x28,0x0,
0x7a,0x35,0x23,0x7e,0x34,0x0, 0x3, 0x7a,0x37,0x2, 0x61,0x22,0x7e,0x34,0x0, 0x4,
0x7a,0x37,0x2, 0x61,0x80,0x10,0xe4,0x7c,0x78,0x7c,0x69,0x2, 0x18,0x0, 0x7e,0x34,
0x0, 0x5, 0x7a,0x37,0x2, 0x61,0xe4,0x7a,0xb3,0x2, 0x79,0x22,0x7a,0x93,0x2, 0x84,
0x22,0xca,0x7b,0xca,0x2b,0xca,0x1b,0xca,0xb, 0xd2,0x0, 0x30,0x90,0x22,0xc2,0x90,
0x7e,0x71,0x91,0x7e,0xb3,0x2, 0x6b,0x70,0x4, 0x7a,0x73,0x2, 0x44,0x11,0x9a,0x7e,
0xb3,0x2, 0x6b,0x4, 0x7a,0xb3,0x2, 0x6b,0x30,0x2, 0x5, 0xe4,0x11,0x0, 0xf5,0x91,
0x30,0x91,0xf, 0xc2,0x91,0x7e,0xb3,0x2, 0x6b,0x4, 0x7a,0xb3,0x2, 0x6b,0x11,0x0,
0xf5,0x91,0xda,0xb, 0xda,0x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xf8,0x22,0x7f,
0x1, 0x7c,0xb1,0xf5,0x16,0x7c,0xb2,0xf5,0x15,0x7c,0xb3,0xf5,0x14,0xa9,0xc2,0xb4,
0x74,0xb, 0x11,0x68,0xe5,0x16,0x11,0x68,0xe5,0x15,0x11,0x68,0xe5,0x14,0x11,0x68,
0xe4,0x1, 0x68,0x7f,0x70,0x7f,0x1, 0x91,0x6f,0x7f,0x7, 0x7e,0x1d,0x10,0x11,0x83,
0xa9,0xd2,0xb4,0xd3,0x22,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0x7c,0xa7,0xa, 0xf6,0x6d,0xee,0x60,0x2, 0x1, 0xb0,0x1b,0xa0,0x68,0x23,0x1b,0xa0,
0x68,0x2e,0x1b,0xa0,0x68,0x3a,0x1b,0xa0,0x68,0x44,0x1b,0xa0,0x68,0x50,0x1b,0xa0,
0x68,0x6d,0x2e,0xa0,0x6, 0x68,0x2, 0x21,0x15,0x7e,0x34,0x0, 0x28,0x7a,0x35,0x25,
0x22,0x7d,0xf, 0x6d,0x11,0x7e,0x35,0x25,0x59,0x13,0x0, 0x2, 0x1b,0x38,0x0, 0x22,
0x7d,0x4e,0x7c,0x89,0x7d,0x5f,0x7c,0x9a,0x7c,0xab,0xe4,0x7e,0x15,0x25,0x80,0x2e,
0x7e,0x15,0x25,0x49,0x31,0x0, 0x2, 0xb, 0x18,0x20,0x2f,0x17,0x80,0x29,0x7d,0x2f,
0x6d,0x33,0x7e,0x15,0x25,0x59,0x31,0x0, 0x6, 0x59,0x21,0x0, 0x4, 0x22,0x7d,0x4e,
0x7c,0x89,0x7d,0x5f,0x7c,0x9a,0x7c,0xab,0xe4,0x7e,0x15,0x25,0xb, 0x16,0x49,0x31,
0x0, 0x2, 0xb, 0x18,0x20,0x2f,0x12,0x59,0x31,0x0, 0x2, 0x1b,0x18,0x20,0x22,0x7e,
0x35,0x25,0x7d,0x23,0xb, 0x26,0x49,0x12,0x0, 0x2, 0xb, 0x28,0x0, 0x2f,0x7, 0x59,
0x12,0x0, 0x2, 0x1b,0x28,0x0, 0x7e,0x24,0x0, 0x6, 0x7a,0x27,0x2, 0x61,0x80,0x5d,
0x7e,0x73,0x2, 0x89,0xa, 0x37,0x6d,0x22,0x7c,0x67,0x6c,0x77,0x7e,0x33,0x2, 0x88,
0xa, 0x13,0x7d,0x1, 0x6d,0x11,0x2f,0x1, 0x7e,0x73,0x2, 0x8a,0xa, 0x37,0x2f,0x10,
0x7e,0x15,0x25,0x59,0x31,0x0, 0x2, 0x1b,0x18,0x20,0x7e,0x73,0x2, 0x8c,0xa, 0x37,
0x6d,0x22,0x7c,0x67,0x6c,0x77,0x7e,0x13,0x2, 0x8b,0xa, 0x51,0x7d,0x45,0x6d,0x55,
0x2f,0x21,0x7e,0x73,0x2, 0x8d,0xa, 0x37,0x2f,0x12,0x59,0x31,0x0, 0x6, 0x59,0x21,
0x0, 0x4, 0x7e,0x34,0x0, 0x6, 0x7a,0x37,0x2, 0x61,0x7e,0x35,0x25,0x7a,0x35,0x23,
0xe4,0x7a,0xb3,0x2, 0x79,0x22,0x75,0xa8,0x0, 0x75,0xdf,0x0, 0x12,0x4, 0x56,0x12,
0x6, 0x65,0x12,0x10,0x21,0xd2,0x7, 0x12,0x10,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12,0x0, 0x9d,0x2e,0x34,0x10,0x0, 0x7a,
0x37,0x2, 0x67,0x31,0x33,0x81,0x27,0x6d,0x33,0x7a,0x37,0x2, 0x61,0x7a,0x37,0x2,
0x67,0x7e,0x18,0x1, 0x0, 0x7a,0x1d,0x10,0x7e,0x15,0x23,0x49,0x31,0x0, 0x2, 0xb,
0x18,0x20,0x2e,0x14,0x0, 0xa, 0x6d,0x0, 0x12,0x14,0x93,0x30,0x0, 0x9, 0x7e,0x35,
0x23,0x9, 0xb3,0x0, 0xa, 0xf5,0x91,0x31,0x33,0x7e,0x34,0xf0,0x88,0x80,0x2c,0x6d,
0x33,0x7a,0x37,0x2, 0x61,0x7a,0x37,0x2, 0x67,0x7e,0x18,0x2, 0x79,0x7a,0x1d,0xc,
0x7e,0x55,0x23,0x49,0x35,0x0, 0x2, 0xb, 0x58,0x20,0x49,0x15,0x0, 0x6, 0x49,0x5,
0x0, 0x4, 0x12,0xe, 0xc0,0x31,0x33,0x7e,0x34,0xf0,0x55,0x7a,0x37,0x2, 0x67,0x81,
0x27,0x75,0x22,0x0, 0x6d,0x33,0x7a,0x37,0x2, 0x61,0x7a,0x37,0x2, 0x67,0x7e,0xb3,
0x2, 0x6a,0xb4,0xa, 0xe, 0x30,0x8, 0x6, 0xe4,0x12,0x13,0xe3,0x81,0x1d,0x12,0x12,
0x2d,0x81,0x1d,0x7e,0xb3,0x2, 0x6a,0xb4,0xb, 0x67,0x7e,0x1f,0x2, 0x63,0xbe,0x18,
0x0, 0x0, 0x78,0x2, 0x81,0x27,0x7e,0x14,0xe0,0x0, 0x7e,0x4, 0x0, 0x1, 0xbf,0x10,
0x28,0x2, 0x81,0x27,0xa2,0x3, 0xe4,0x33,0x78,0x2, 0x81,0x27,0x7d,0x13,0x5e,0x14,
0xf, 0xff,0x78,0x14,0x74,0xc, 0x7f,0x1, 0x1e,0x14,0x1e,0x4, 0x50,0x3, 0x4e,0x20,
0x80,0x14,0x78,0xf4,0x7c,0xb3,0x80,0x12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 0xf, 0xff,0x78,0x1a,0x49,0x31,0x0, 0x6, 0x49,0x21,
0x0, 0x4, 0x74,0xc, 0x1e,0x34,0x1e,0x24,0x50,0x3, 0x4e,0x60,0x80,0x14,0x78,0xf4,
0x7c,0xe7,0x80,0x1a,0x49,0x31,0x0, 0x6, 0x49,0x21,0x0, 0x4, 0x74,0xc, 0x1e,0x34,
0x1e,0x24,0x50,0x3, 0x4e,0x60,0x80,0x14,0x78,0xf4,0x7c,0xe7,0xb, 0xe0,0xa, 0x2e,
0xe5,0x8, 0xa, 0x3b,0x2d,0x32,0xbe,0x34,0x0, 0x1f,0x18,0x1b,0x6c,0xff,0x80,0x9,
0xe5,0x8, 0x2c,0xbf,0x12,0x11,0xe4,0xb, 0xf0,0xbc,0xef,0x38,0xf3,0x7e,0x34,0xf0,
0xaa,0x7a,0x37,0x2, 0x67,0x31,0x33,0x20,0x6, 0x2, 0x21,0xa2,0x7e,0x34,0x13,0x88,
0x12,0x6, 0xfe,0x7e,0x34,0x13,0x88,0x12,0x6, 0xfe,0x75,0xe9,0xff,0x21,0xa2,0xff,