feat: touch: add nt38350 selftest

CHAMPION-95

add nt38350 selftest

Change-Id: I15cbaf04f9dc9131b4e661cd29e56d5bece6b4db
Signed-off-by: futerigele <futerigele@xiaomi.com>
This commit is contained in:
futerigele
2021-09-24 19:43:15 +08:00
parent 4fc0e71ba6
commit ea1e5c3d2c
3 changed files with 1046 additions and 13 deletions
+45
View File
@@ -111,6 +111,51 @@ config nt38350_NPOLLWAITERS
---help---
Maximum number of threads that can be waiting on poll()
config NVT_OFFLINE_LOG
bool "NovaTek NT38350 Offline log"
default n
---help---
Say yes here to enable Offline log
config NVT_TOUCH_MP
bool "NovaTek NT38350 Self test"
default n
---help---
Say yes here to enable Self test
if NVT_TOUCH_MP
config NVT_SHORT_TEST_CSV_FILE
string "NovaTek NT38350 Self test Short test file path"
default "/mnt/data/ShortTest.csv"
---help---
Set up Short test file path
config NVT_OPEN_TEST_CSV_FILE
string "NovaTek NT38350 Self test Open test file path"
default "/mnt/data/OpenTest.csv"
---help---
Set up Open test file path
config NVT_FW_RAWDATA_CSV_FILE
string "NovaTek NT38350 Self test FW raw data test file path"
default "/mnt/data/FWRawdataTest.csv"
---help---
Set up FW raw data test file path
config NVT_FW_CC_CSV_FILE
string "NovaTek NT38350 Self test FW CC test file path"
default "/mnt/data/FWCCTest.csv"
---help---
Set up FW CC test file path
config NVT_NOISE_TEST_CSV_FILE
string "NovaTek NT38350 Self test Noise test file path"
default "/mnt/data/NoiseTest.csv"
---help---
Set up Noise test file path
endif # NVT_TOUCH_MP
endif # INPUT_NT38350
config INPUT_FT5336
+966 -13
View File
File diff suppressed because it is too large Load Diff
+35
View File
@@ -38,6 +38,21 @@
* Pre-processor Definitions
****************************************************************************/
#ifdef CONFIG_NVT_TOUCH_MP
#define NVT_FREQ_HOP_DISABLE 0x66
#define NVT_FREQ_HOP_ENABLE 0x65
#define NVT_MP_MODE_CC 0x41
#define NVT_IC_X_CFG_SIZE 6
#define NVT_IC_Y_CFG_SIZE 6
#define NVT_IC_KEY_CFG_SIZE 0
#define NVT_X_CHANNEL 6
#define NVT_Y_CHANNEL 6
#define NVT_KEY_CHANNEL NVT_TOUCH_KEY_NUM
#define NVT_RESULT_BUFSIZE (NVT_IC_X_CFG_SIZE * NVT_IC_Y_CFG_SIZE + NVT_IC_KEY_CFG_SIZE)
#define NVT_RAWDATA_BUFSIZE ((NVT_RESULT_BUFSIZE) * sizeof(int32_t))
#define PS_CONFIG_DIFF_TEST_FRAME 50
#endif
/* Specific IOCTL commands for NT38350 */
#define TSIOC_GETNVTDIFF _TSIOC(0x0006) /* arg: Pointer to get struct nvt_diff_s */
@@ -97,6 +112,26 @@ struct nt38350_config_s
bool state);
};
#ifdef CONFIG_NVT_TOUCH_MP
struct nvt_mp_test_s
{
int cmd;
char *test_item;
uint8_t record_result[NVT_RESULT_BUFSIZE];
int32_t result_flag;
int32_t raw_data[NVT_RAWDATA_BUFSIZE];
};
enum mp_test_e
{
NVT_FW_RAW = 0x01,
NVT_CC,
NVT_FW_NOISE,
NVT_FW_SHORT,
NVT_FW_OPEN
};
#endif
/****************************************************************************
* Public Function Prototypes
****************************************************************************/