Initial commit: Linux kernel 4.19 for Unplugged OS

This commit is contained in:
ziv committed 2025-10-06 13:52:42 +00:00
commit d30235b04c
80519 files changed
+35800681

No files matched your search

@@ -0,0 +1,15 @@
#
# Novatek NT36xxx touchscreen driver configuration
#
menu "NT36xxx support"
depends on INPUT_TOUCHSCREEN
config TOUCHSCREEN_NT36xxx
bool "Novatek NT36xxx"
help
Say Y here if you have a Novatek NT36xxx touchscreen connected
to your system.
If unsure, say N.
endmenu
@@ -0,0 +1,9 @@
# include $(srctree)/drivers/misc/mediatek/Makefile.custom
# Linux driver folder
ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/
ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include/
obj-y += nt36xxx.o nt36xxx_fw_update.o nt36xxx_ext_proc.o nt36xxx_mp_ctrlram.o
obj-y += tpd_setting.o
obj-y += mtk_tpd.o
obj-y += tpd_button.o
@@ -0,0 +1,752 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2019 MediaTek Inc.
*/
#include "tpd.h"
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/miscdevice.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/fb.h>
#include <linux/pinctrl/consumer.h>
#ifdef CONFIG_MTK_MT6306_GPIO_SUPPORT
#include <mtk_6306_gpio.h>
#endif
#ifdef CONFIG_COMPAT
#include <linux/compat.h>
#endif
#if defined(CONFIG_MTK_S3320) || defined(CONFIG_MTK_S3320_50) \
|| defined(CONFIG_MTK_S3320_47) || defined(CONFIG_MTK_MIT200) \
|| defined(CONFIG_TOUCHSCREEN_SYNAPTICS_S3528) \
|| defined(CONFIG_MTK_S7020) \
|| defined(CONFIG_TOUCHSCREEN_MTK_SYNAPTICS_3320_50)
#include <linux/input/mt.h>
#endif /* CONFIG_MTK_S3320 */
/* for magnify velocity******************************************** */
#define TOUCH_IOC_MAGIC 'A'
#define TPD_GET_VELOCITY_CUSTOM_X _IO(TOUCH_IOC_MAGIC, 0)
#define TPD_GET_VELOCITY_CUSTOM_Y _IO(TOUCH_IOC_MAGIC, 1)
#define TPD_GET_FILTER_PARA _IOWR(TOUCH_IOC_MAGIC, 2, struct tpd_filter_t)
#ifdef CONFIG_COMPAT
#define COMPAT_TPD_GET_FILTER_PARA _IOWR(TOUCH_IOC_MAGIC, \
2, struct tpd_filter_t)
#endif
struct tpd_filter_t tpd_filter;
struct tpd_dts_info tpd_dts_data;
struct pinctrl *pinctrl1;
struct pinctrl_state *pins_default;
struct pinctrl_state *eint_as_int, *eint_output0,
*eint_output1, *rst_output0, *rst_output1;
const struct of_device_id touch_of_match[] = {
{ .compatible = "goodix,touch", },
{},
};
void tpd_get_dts_info(void)
{
struct device_node *node1 = NULL;
int key_dim_local[16], i;
node1 = of_find_matching_node(node1, touch_of_match);
if (node1) {
of_property_read_u32(node1,
"tpd-max-touch-num", &tpd_dts_data.touch_max_num);
of_property_read_u32(node1,
"use-tpd-button", &tpd_dts_data.use_tpd_button);
pr_debug("[tpd]use-tpd-button = %d\n",
tpd_dts_data.use_tpd_button);
if (of_property_read_u32_array(node1, "tpd-resolution",
tpd_dts_data.tpd_resolution,
ARRAY_SIZE(tpd_dts_data.tpd_resolution))) {
pr_debug("[tpd] resulution is %d %d",
tpd_dts_data.tpd_resolution[0],
tpd_dts_data.tpd_resolution[1]);
}
if (tpd_dts_data.use_tpd_button) {
of_property_read_u32(node1,
"tpd-key-num", &tpd_dts_data.tpd_key_num);
if (of_property_read_u32_array(node1, "tpd-key-local",
tpd_dts_data.tpd_key_local,
ARRAY_SIZE(tpd_dts_data.tpd_key_local)))
pr_debug("tpd-key-local: %d %d %d %d",
tpd_dts_data.tpd_key_local[0],
tpd_dts_data.tpd_key_local[1],
tpd_dts_data.tpd_key_local[2],
tpd_dts_data.tpd_key_local[3]);
if (of_property_read_u32_array(node1,
"tpd-key-dim-local",
key_dim_local, ARRAY_SIZE(key_dim_local))) {
memcpy(tpd_dts_data.tpd_key_dim_local,
key_dim_local, sizeof(key_dim_local));
for (i = 0; i < 4; i++) {
pr_debug("[tpd]key[%d].key_x = %d\n", i,
tpd_dts_data
.tpd_key_dim_local[i]
.key_x);
pr_debug("[tpd]key[%d].key_y = %d\n", i,
tpd_dts_data
.tpd_key_dim_local[i]
.key_y);
pr_debug("[tpd]key[%d].key_W = %d\n", i,
tpd_dts_data
.tpd_key_dim_local[i]
.key_width);
pr_debug("[tpd]key[%d].key_H = %d\n", i,
tpd_dts_data
.tpd_key_dim_local[i]
.key_height);
}
}
}
of_property_read_u32(node1, "tpd-filter-enable",
&tpd_dts_data.touch_filter.enable);
if (tpd_dts_data.touch_filter.enable) {
of_property_read_u32(node1,
"tpd-filter-pixel-density",
&tpd_dts_data.touch_filter.pixel_density);
if (of_property_read_u32_array(node1,
"tpd-filter-custom-prameters",
(u32 *)tpd_dts_data.touch_filter.W_W,
ARRAY_SIZE(tpd_dts_data.touch_filter.W_W)))
pr_debug("get tpd-filter-custom-parameters");
if (of_property_read_u32_array(node1,
"tpd-filter-custom-speed",
tpd_dts_data.touch_filter.VECLOCITY_THRESHOLD,
ARRAY_SIZE(tpd_dts_data
.touch_filter
.VECLOCITY_THRESHOLD)))
pr_debug("get tpd-filter-custom-speed");
}
memcpy(&tpd_filter,
&tpd_dts_data.touch_filter, sizeof(tpd_filter));
pr_debug("[tpd]tpd-filter-enable = %d, pixel_density = %d\n",
tpd_filter.enable, tpd_filter.pixel_density);
tpd_dts_data.tpd_use_ext_gpio =
of_property_read_bool(node1, "tpd-use-ext-gpio");
of_property_read_u32(node1,
"tpd-rst-ext-gpio-num",
&tpd_dts_data.rst_ext_gpio_num);
} else {
TPD_DMESG("can't find touch compatible custom node\n");
}
}
static DEFINE_MUTEX(tpd_set_gpio_mutex);
void tpd_gpio_as_int(int pin)
{
mutex_lock(&tpd_set_gpio_mutex);
TPD_DEBUG("[tpd]tpd gpio as int\n");
if (pin == 1)
pinctrl_select_state(pinctrl1, eint_as_int);
mutex_unlock(&tpd_set_gpio_mutex);
}
void tpd_gpio_output(int pin, int level)
{
mutex_lock(&tpd_set_gpio_mutex);
TPD_DEBUG("gpio_output pin = %d, level = %d\n", pin, level);
if (pin == 1) {
if (level)
pinctrl_select_state(pinctrl1, eint_output1);
else
pinctrl_select_state(pinctrl1, eint_output0);
} else {
if (tpd_dts_data.tpd_use_ext_gpio) {
#ifdef CONFIG_MTK_MT6306_GPIO_SUPPORT
mt6306_set_gpio_dir(
tpd_dts_data.rst_ext_gpio_num, 1);
mt6306_set_gpio_out(
tpd_dts_data.rst_ext_gpio_num, level);
#endif
} else {
if (level)
pinctrl_select_state(pinctrl1, rst_output1);
else
pinctrl_select_state(pinctrl1, rst_output0);
}
}
mutex_unlock(&tpd_set_gpio_mutex);
}
int tpd_get_gpio_info(struct platform_device *pdev)
{
int ret;
TPD_DEBUG("[tpd %d] mt_tpd_pinctrl+++++++++++++++++\n", pdev->id);
pinctrl1 = devm_pinctrl_get(&pdev->dev);
if (IS_ERR(pinctrl1)) {
ret = PTR_ERR(pinctrl1);
dev_info(&pdev->dev, "fwq Cannot find pinctrl1!\n");
return ret;
}
pins_default = pinctrl_lookup_state(pinctrl1, "default");
if (IS_ERR(pins_default)) {
ret = PTR_ERR(pins_default);
TPD_DMESG("Cannot find pinctrl default %d!\n", ret);
}
eint_as_int = pinctrl_lookup_state(pinctrl1, "state_eint_as_int");
if (IS_ERR(eint_as_int)) {
ret = PTR_ERR(eint_as_int);
TPD_DMESG("Cannot find pinctrl state_eint_as_int!\n");
return ret;
}
eint_output0 = pinctrl_lookup_state(pinctrl1, "state_eint_output0");
if (IS_ERR(eint_output0)) {
ret = PTR_ERR(eint_output0);
TPD_DMESG("Cannot find pinctrl state_eint_output0!\n");
return ret;
}
eint_output1 = pinctrl_lookup_state(pinctrl1, "state_eint_output1");
if (IS_ERR(eint_output1)) {
ret = PTR_ERR(eint_output1);
TPD_DMESG("Cannot find pinctrl state_eint_output1!\n");
return ret;
}
if (tpd_dts_data.tpd_use_ext_gpio == false) {
rst_output0 =
pinctrl_lookup_state(pinctrl1, "state_rst_output0");
if (IS_ERR(rst_output0)) {
ret = PTR_ERR(rst_output0);
TPD_DMESG("Cannot find pinctrl state_rst_output0!\n");
return ret;
}
rst_output1 =
pinctrl_lookup_state(pinctrl1, "state_rst_output1");
if (IS_ERR(rst_output1)) {
ret = PTR_ERR(rst_output1);
TPD_DMESG("Cannot find pinctrl state_rst_output1!\n");
return ret;
}
}
TPD_DEBUG("[tpd%d] mt_tpd_pinctrl----------\n", pdev->id);
return 0;
}
static int tpd_misc_open(struct inode *inode, struct file *file)
{
return nonseekable_open(inode, file);
}
static int tpd_misc_release(struct inode *inode, struct file *file)
{
return 0;
}
#ifdef CONFIG_COMPAT
static long tpd_compat_ioctl(
struct file *file, unsigned int cmd,
unsigned long arg)
{
long ret;
void __user *arg32 = compat_ptr(arg);
if (!file->f_op || !file->f_op->unlocked_ioctl)
return -ENOTTY;
switch (cmd) {
case COMPAT_TPD_GET_FILTER_PARA:
if (arg32 == NULL) {
pr_info("invalid argument.");
return -EINVAL;
}
ret = file->f_op->unlocked_ioctl(file, TPD_GET_FILTER_PARA,
(unsigned long)arg32);
if (ret) {
pr_info("TPD_GET_FILTER_PARA unlocked_ioctl failed.");
return ret;
}
break;
default:
pr_info("tpd: unknown IOCTL: 0x%08x\n", cmd);
ret = -ENOIOCTLCMD;
break;
}
return ret;
}
#endif
static long tpd_unlocked_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
/* char strbuf[256]; */
void __user *data;
long err = 0;
if (_IOC_DIR(cmd) & _IOC_READ)
err = !access_ok(VERIFY_WRITE,
(void __user *)arg, _IOC_SIZE(cmd));
else if (_IOC_DIR(cmd) & _IOC_WRITE)
err = !access_ok(VERIFY_READ,
(void __user *)arg, _IOC_SIZE(cmd));
if (err) {
pr_info("tpd: access error: %08X, (%2d, %2d)\n",
cmd, _IOC_DIR(cmd), _IOC_SIZE(cmd));
return -EFAULT;
}
switch (cmd) {
case TPD_GET_VELOCITY_CUSTOM_X:
data = (void __user *)arg;
if (data == NULL) {
err = -EINVAL;
break;
}
if (copy_to_user(data,
&tpd_v_magnify_x, sizeof(tpd_v_magnify_x))) {
err = -EFAULT;
break;
}
break;
case TPD_GET_VELOCITY_CUSTOM_Y:
data = (void __user *)arg;
if (data == NULL) {
err = -EINVAL;
break;
}
if (copy_to_user(data,
&tpd_v_magnify_y, sizeof(tpd_v_magnify_y))) {
err = -EFAULT;
break;
}
break;
case TPD_GET_FILTER_PARA:
data = (void __user *) arg;
if (data == NULL) {
err = -EINVAL;
TPD_DMESG("GET_FILTER_PARA: data is null\n");
break;
}
if (copy_to_user(data, &tpd_filter,
sizeof(struct tpd_filter_t))) {
TPD_DMESG("GET_FILTER_PARA: copy data error\n");
err = -EFAULT;
break;
}
break;
default:
pr_info("tpd: unknown IOCTL: 0x%08x\n", cmd);
err = -ENOIOCTLCMD;
break;
}
return err;
}
static struct work_struct touch_resume_work;
static struct workqueue_struct *touch_resume_workqueue;
static const struct file_operations tpd_fops = {
/* .owner = THIS_MODULE, */
.open = tpd_misc_open,
.release = tpd_misc_release,
.unlocked_ioctl = tpd_unlocked_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = tpd_compat_ioctl,
#endif
};
/*---------------------------------------------------------------------------*/
static struct miscdevice tpd_misc_device = {
.minor = MISC_DYNAMIC_MINOR,
.name = "touch",
.fops = &tpd_fops,
};
/* ********************************************** */
/* #endif */
/* function definitions */
static int __init tpd_device_init(void);
static void __exit tpd_device_exit(void);
static int tpd_probe(struct platform_device *pdev);
static int tpd_remove(struct platform_device *pdev);
static struct work_struct tpd_init_work;
static struct workqueue_struct *tpd_init_workqueue;
static int tpd_suspend_flag;
int tpd_register_flag;
/* global variable definitions */
struct tpd_device *tpd;
static struct tpd_driver_t tpd_driver_list[TP_DRV_MAX_COUNT]; /* = {0}; */
struct platform_device tpd_device = {
.name = TPD_DEVICE,
.id = -1,
};
const struct dev_pm_ops tpd_pm_ops = {
.suspend = NULL,
.resume = NULL,
};
static struct platform_driver tpd_driver = {
.remove = tpd_remove,
.shutdown = NULL,
.probe = tpd_probe,
.driver = {
.name = TPD_DEVICE,
.pm = &tpd_pm_ops,
.owner = THIS_MODULE,
.of_match_table = touch_of_match,
},
};
static struct tpd_driver_t *g_tpd_drv;
/* hh: use fb_notifier */
static struct notifier_block tpd_fb_notifier;
/* use fb_notifier */
static void touch_resume_workqueue_callback(struct work_struct *work)
{
TPD_DEBUG("GTP touch_resume_callback\n");
g_tpd_drv->resume(NULL);
tpd_suspend_flag = 0;
}
static int tpd_fb_notifier_callback(
struct notifier_block *self,
unsigned long event, void *data)
{
struct fb_event *evdata = NULL;
int blank;
int err = 0;
TPD_DEBUG("fb_notifier_callback\n");
evdata = data;
/* If we aren't interested in this event, skip it immediately ... */
if (event != FB_EVENT_BLANK)
return 0;
blank = *(int *)evdata->data;
TPD_DMESG("fb_notify(blank=%d)\n", blank);
switch (blank) {
case FB_BLANK_UNBLANK:
TPD_DMESG("LCD ON Notify\n");
if (g_tpd_drv && tpd_suspend_flag) {
err = queue_work(touch_resume_workqueue,
&touch_resume_work);
if (!err) {
TPD_DMESG("start resume_workqueue failed\n");
return err;
}
}
break;
case FB_BLANK_POWERDOWN:
TPD_DMESG("LCD OFF Notify\n");
if (g_tpd_drv && !tpd_suspend_flag) {
err = cancel_work_sync(&touch_resume_work);
if (!err)
TPD_DMESG("cancel resume_workqueue failed\n");
g_tpd_drv->suspend(NULL);
}
tpd_suspend_flag = 1;
break;
default:
break;
}
return 0;
}
/* Add driver: if find TPD_TYPE_CAPACITIVE driver successfully, loading it */
int tpd_driver_add(struct tpd_driver_t *tpd_drv)
{
int i;
if (g_tpd_drv != NULL) {
TPD_DMESG("touch driver exist\n");
return -1;
}
/* check parameter */
if (tpd_drv == NULL)
return -1;
tpd_drv->tpd_have_button = tpd_dts_data.use_tpd_button;
/* R-touch */
if (strcmp(tpd_drv->tpd_device_name, "generic") == 0) {
tpd_driver_list[0].tpd_device_name = tpd_drv->tpd_device_name;
tpd_driver_list[0].tpd_local_init = tpd_drv->tpd_local_init;
tpd_driver_list[0].suspend = tpd_drv->suspend;
tpd_driver_list[0].resume = tpd_drv->resume;
tpd_driver_list[0].tpd_have_button = tpd_drv->tpd_have_button;
return 0;
}
for (i = 1; i < TP_DRV_MAX_COUNT; i++) {
/* add tpd driver into list */
if (tpd_driver_list[i].tpd_device_name == NULL) {
tpd_driver_list[i].tpd_device_name =
tpd_drv->tpd_device_name;
tpd_driver_list[i].tpd_local_init =
tpd_drv->tpd_local_init;
tpd_driver_list[i].suspend = tpd_drv->suspend;
tpd_driver_list[i].resume = tpd_drv->resume;
tpd_driver_list[i].tpd_have_button =
tpd_drv->tpd_have_button;
tpd_driver_list[i].attrs = tpd_drv->attrs;
break;
}
if (strcmp(tpd_driver_list[i].tpd_device_name,
tpd_drv->tpd_device_name) == 0)
return 1; /* driver exist */
}
return 0;
}
int tpd_driver_remove(struct tpd_driver_t *tpd_drv)
{
int i = 0;
/* check parameter */
if (tpd_drv == NULL)
return -1;
for (i = 0; i < TP_DRV_MAX_COUNT; i++) {
/* find it */
if (strcmp(tpd_driver_list[i].tpd_device_name,
tpd_drv->tpd_device_name) == 0) {
memset(&tpd_driver_list[i], 0,
sizeof(struct tpd_driver_t));
break;
}
}
return 0;
}
static void tpd_create_attributes(struct device *dev, struct tpd_attrs *attrs)
{
int num = attrs->num;
for (; num > 0;) {
if (device_create_file(dev, attrs->attr[--num]))
pr_info("mtk_tpd: tpd create attributes file failed\n");
}
}
/* touch panel probe */
static int tpd_probe(struct platform_device *pdev)
{
int touch_type = 1; /* 0:R-touch, 1: Cap-touch */
int i = 0;
#ifndef CONFIG_CUSTOM_LCM_X
#ifdef CONFIG_LCM_WIDTH
unsigned long tpd_res_x = 0, tpd_res_y = 0;
int ret = 0;
#endif
#endif
TPD_DMESG("enter %s, %d\n", __func__, __LINE__);
if (misc_register(&tpd_misc_device))
pr_info("mtk_tpd: tpd_misc_device register failed\n");
tpd_get_gpio_info(pdev);
tpd = kmalloc(sizeof(struct tpd_device), GFP_KERNEL);
if (tpd == NULL)
return -ENOMEM;
memset(tpd, 0, sizeof(struct tpd_device));
/* allocate input device */
tpd->dev = input_allocate_device();
if (tpd->dev == NULL) {
kfree(tpd);
return -ENOMEM;
}
/* TPD_RES_X = simple_strtoul(LCM_WIDTH, NULL, 0); */
/* TPD_RES_Y = simple_strtoul(LCM_HEIGHT, NULL, 0); */
#ifdef CONFIG_MTK_LCM_PHYSICAL_ROTATION
if (strncmp(CONFIG_MTK_LCM_PHYSICAL_ROTATION, "90", 2) == 0
|| strncmp(CONFIG_MTK_LCM_PHYSICAL_ROTATION, "270", 3) == 0) {
#ifdef CONFIG_MTK_FB
/*Fix build errors,as some projects cannot support these apis while bring up*/
TPD_RES_Y = DISP_GetScreenWidth();
TPD_RES_X = DISP_GetScreenHeight();
#endif
} else
#endif
{
#ifdef CONFIG_CUSTOM_LCM_X
#ifndef CONFIG_FPGA_EARLY_PORTING
#if defined(CONFIG_MTK_FB) && defined(CONFIG_MTK_LCM)
/*Fix build errors,as some projects cannot support these apis while bring up*/
TPD_RES_X = DISP_GetScreenWidth();
TPD_RES_Y = DISP_GetScreenHeight();
#else
/*for some projects, we do not use mtk framebuffer*/
TPD_RES_X = tpd_dts_data.tpd_resolution[0];
TPD_RES_Y = tpd_dts_data.tpd_resolution[1];
#endif
#endif
#else
#ifdef CONFIG_LCM_WIDTH
ret = kstrtoul(CONFIG_LCM_WIDTH, 0, &tpd_res_x);
if (ret < 0) {
pr_info("Touch down get lcm_x failed");
return ret;
}
TPD_RES_X = tpd_res_x;
ret = kstrtoul(CONFIG_LCM_HEIGHT, 0, &tpd_res_x);
if (ret < 0) {
pr_info("Touch down get lcm_y failed");
return ret;
}
TPD_RES_Y = tpd_res_y;
#endif
#endif
}
if (2560 == TPD_RES_X)
TPD_RES_X = 2048;
if (1600 == TPD_RES_Y)
TPD_RES_Y = 1536;
pr_debug("mtk_tpd: TPD_RES_X = %lu, TPD_RES_Y = %lu\n",
TPD_RES_X, TPD_RES_Y);
tpd_mode = TPD_MODE_NORMAL;
tpd_mode_axis = 0;
tpd_mode_min = TPD_RES_Y / 2;
tpd_mode_max = TPD_RES_Y;
tpd_mode_keypad_tolerance = TPD_RES_X * TPD_RES_X / 1600;
/* struct input_dev dev initialization and registration */
tpd->dev->name = TPD_DEVICE;
set_bit(EV_ABS, tpd->dev->evbit);
set_bit(EV_KEY, tpd->dev->evbit);
set_bit(ABS_X, tpd->dev->absbit);
set_bit(ABS_Y, tpd->dev->absbit);
set_bit(ABS_PRESSURE, tpd->dev->absbit);
#if !defined(CONFIG_MTK_S3320) && !defined(CONFIG_MTK_S3320_47)\
&& !defined(CONFIG_MTK_S3320_50) && !defined(CONFIG_MTK_MIT200) \
&& !defined(CONFIG_TOUCHSCREEN_SYNAPTICS_S3528) \
&& !defined(CONFIG_MTK_S7020) \
&& !defined(CONFIG_TOUCHSCREEN_MTK_SYNAPTICS_3320_50)
set_bit(BTN_TOUCH, tpd->dev->keybit);
#endif /* CONFIG_MTK_S3320 */
set_bit(INPUT_PROP_DIRECT, tpd->dev->propbit);
/* save dev for regulator_get() before tpd_local_init() */
tpd->tpd_dev = &pdev->dev;
for (i = 1; i < TP_DRV_MAX_COUNT; i++) {
/* add tpd driver into list */
if (tpd_driver_list[i].tpd_device_name != NULL) {
tpd_driver_list[i].tpd_local_init();
/* msleep(1); */
if (tpd_load_status == 1) {
TPD_DMESG("probe, tpd_driver_name=%s\n",
tpd_driver_list[i].tpd_device_name);
g_tpd_drv = &tpd_driver_list[i];
break;
}
}
}
if (g_tpd_drv == NULL) {
if (tpd_driver_list[0].tpd_device_name != NULL) {
g_tpd_drv = &tpd_driver_list[0];
/* touch_type:0: r-touch, 1: C-touch */
touch_type = 0;
g_tpd_drv->tpd_local_init();
TPD_DMESG("Generic touch panel driver\n");
} else {
TPD_DMESG("no touch driver is loaded!!\n");
return 0;
}
}
touch_resume_workqueue = create_singlethread_workqueue("touch_resume");
INIT_WORK(&touch_resume_work, touch_resume_workqueue_callback);
/* use fb_notifier */
tpd_fb_notifier.notifier_call = tpd_fb_notifier_callback;
if (fb_register_client(&tpd_fb_notifier))
TPD_DMESG("register fb_notifier fail!\n");
/* TPD_TYPE_CAPACITIVE handle */
if (touch_type == 1) {
set_bit(ABS_MT_TRACKING_ID, tpd->dev->absbit);
set_bit(ABS_MT_TOUCH_MAJOR, tpd->dev->absbit);
set_bit(ABS_MT_TOUCH_MINOR, tpd->dev->absbit);
set_bit(ABS_MT_POSITION_X, tpd->dev->absbit);
set_bit(ABS_MT_POSITION_Y, tpd->dev->absbit);
input_set_abs_params(tpd->dev,
ABS_MT_POSITION_X, 0, TPD_RES_X, 0, 0);
input_set_abs_params(tpd->dev,
ABS_MT_POSITION_Y, 0, TPD_RES_Y, 0, 0);
#if defined(CONFIG_MTK_S3320) || defined(CONFIG_MTK_S3320_47) \
|| defined(CONFIG_MTK_S3320_50) || defined(CONFIG_MTK_MIT200) \
|| defined(CONFIG_TOUCHSCREEN_SYNAPTICS_S3528) \
|| defined(CONFIG_MTK_S7020) \
|| defined(CONFIG_TOUCHSCREEN_MTK_SYNAPTICS_3320_50)
input_set_abs_params(tpd->dev,
ABS_MT_PRESSURE, 0, 255, 0, 0);
input_set_abs_params(tpd->dev,
ABS_MT_WIDTH_MAJOR, 0, 15, 0, 0);
input_set_abs_params(tpd->dev, ABS_MT_WIDTH_MINOR, 0, 15, 0, 0);
input_mt_init_slots(tpd->dev, 10, 0);
#else
input_set_abs_params(tpd->dev,
ABS_MT_TOUCH_MAJOR, 0, 100, 0, 0);
input_set_abs_params(tpd->dev,
ABS_MT_TOUCH_MINOR, 0, 100, 0, 0);
#endif /* CONFIG_MTK_S3320 */
TPD_DMESG("Cap touch panel driver\n");
}
input_set_abs_params(tpd->dev, ABS_X, 0, TPD_RES_X, 0, 0);
input_set_abs_params(tpd->dev, ABS_Y, 0, TPD_RES_Y, 0, 0);
input_abs_set_res(tpd->dev, ABS_X, TPD_RES_X);
input_abs_set_res(tpd->dev, ABS_Y, TPD_RES_Y);
input_set_abs_params(tpd->dev, ABS_PRESSURE, 0, 255, 0, 0);
input_set_abs_params(tpd->dev, ABS_MT_TRACKING_ID, 0, 10, 0, 0);
if (input_register_device(tpd->dev))
TPD_DMESG("input_register_device failed.(tpd)\n");
else
tpd_register_flag = 1;
if (g_tpd_drv->tpd_have_button)
tpd_button_init();
if (g_tpd_drv->attrs.num)
tpd_create_attributes(&pdev->dev, &g_tpd_drv->attrs);
return 0;
}
static int tpd_remove(struct platform_device *pdev)
{
input_unregister_device(tpd->dev);
return 0;
}
/* called when loaded into kernel */
static void tpd_init_work_callback(struct work_struct *work)
{
TPD_DEBUG("MediaTek touch panel driver init\n");
if (platform_driver_register(&tpd_driver) != 0)
TPD_DMESG("unable to register touch panel driver.\n");
}
static int __init tpd_device_init(void)
{
int res = 0;
tpd_init_workqueue = create_singlethread_workqueue("mtk-tpd");
INIT_WORK(&tpd_init_work, tpd_init_work_callback);
res = queue_work(tpd_init_workqueue, &tpd_init_work);
if (!res)
pr_info("tpd : touch device init failed res:%d\n", res);
return 0;
}
/* should never be called */
static void __exit tpd_device_exit(void)
{
TPD_DMESG("MediaTek touch panel driver exit\n");
/* input_unregister_device(tpd->dev); */
platform_driver_unregister(&tpd_driver);
}
late_initcall(tpd_device_init);
module_exit(tpd_device_exit);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("MediaTek touch panel driver");
MODULE_AUTHOR("Kirby Wu<kirby.wu@mediatek.com>");
@@ -0,0 +1,680 @@
/*
* Copyright (C) 2010 - 2017 Novatek, Inc.
*
* $Revision: 19589 $
* $Date: 2017-11-28 21:26:00 +0800 (周二, 28 十一月 2017) $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
*/
&i2c4 {
/* Novatek device tree node */
cap_touch@62 {
compatible = "mediatek,cap_touch"; //Use MTK default touch
reg = <0x62>;
status = "ok"
/* MP */
//novatek,mp-support-dt;
novatek-mp-criteria-nvtpid@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "novatek-mp-criteria-nvtpid";
/* MP Config */
IC_X_CFG_SIZE = <18>;
IC_Y_CFG_SIZE = <32>;
IC_KEY_CFG_SIZE = <4>;
X_Channel = <18>;
Y_Channel = <32>;
AIN_X = <17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0>;
AIN_Y = <31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15
14 13 12 11 10 9 8 7 6 5 4 3 2 1 0>;
AIN_KEY = <0 1 2 0xFF>;
/* MP Criteria */
PS_Config_Lmt_Short_Rawdata_P = <
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000 20000
20000 20000 20000>;
PS_Config_Lmt_Short_Rawdata_N = <
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550 11550
11550 11550 11550>;
PS_Config_Lmt_Short_Diff_P = <
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300 6300
6300 6300 6300>;
PS_Config_Lmt_Short_Diff_N = <
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0>;
PS_Config_Lmt_Short_Base_P = <
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000>;
PS_Config_Lmt_Short_Base_N = <
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000) (-2000)
(-2000) (-2000) (-2000)>;
PS_Config_Lmt_Open_Rawdata_P = <
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000 13000
13000 13000 13000>;
PS_Config_Lmt_Open_Rawdata_N = <
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500 6500
6500 6500 6500>;
PS_Config_Lmt_FW_Rawdata_P = <
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000 2000
2000 2000 2000>;
PS_Config_Lmt_FW_Rawdata_N = <
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400 400
400 400 400>;
PS_Config_Lmt_FW_CC_P = <
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
38 38 38>;
PS_Config_Lmt_FW_CC_N = <
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
9 9 9>;
PS_Config_Lmt_FW_CC_I_P = <
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25>;
PS_Config_Lmt_FW_CC_I_N = <
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0>;
PS_Config_Lmt_FW_CC_Q_P = <
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25
25 25 25>;
PS_Config_Lmt_FW_CC_Q_N = <
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0>;
PS_Config_Lmt_FW_Diff_P = <
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
35 35 35>;
PS_Config_Lmt_FW_Diff_N = <
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35) (-35)
(-35) (-35) (-35)>;
PS_Config_Diff_Test_Frame = <50>;
};
};
};
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,154 @@
/*
* Copyright (C) 2010 - 2017 Novatek, Inc.
*
* $Revision: 22432 $
* $Date: 2018-01-30 20:14:05 +0800 (周二, 30 一月 2018) $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
*/
#ifndef _LINUX_NVT_TOUCH_H
#define _LINUX_NVT_TOUCH_H
#include <linux/i2c.h>
#include <linux/input.h>
#include "nt36xxx_mem_map.h"
#define NVT_DEBUG 1
#define NVT_GPIO_AS_INT(pin) tpd_gpio_as_int(pin)
#define NVT_GPIO_OUTPUT(pin, level) tpd_gpio_output(pin, level)
//---INT trigger mode---
//#define EINTF_TRIGGER_RISING 0x00000001
//#define EINTF_TRIGGER_FALLING 0x00000002
#define INT_TRIGGER_TYPE IRQF_TRIGGER_RISING
//---I2C driver info.---
#define NVT_I2C_NAME "NVT-ts"
#define I2C_BLDR_Address 0x01
#define I2C_FW_Address 0x01
#define I2C_HW_Address 0x62
#if NVT_DEBUG
#define NVT_LOG(fmt, args...) pr_err("[%s] %s %d: " fmt, NVT_I2C_NAME, __func__, __LINE__, ##args)
#else
#define NVT_LOG(fmt, args...) pr_info("[%s] %s %d: " fmt, NVT_I2C_NAME, __func__, __LINE__, ##args)
#endif
#define NVT_ERR(fmt, args...) pr_err("[%s] %s %d: " fmt, NVT_I2C_NAME, __func__, __LINE__, ##args)
//---Input device info.---
#define NVT_TS_NAME "NVTCapacitiveTouchScreen"
//---Touch info.---
#define TOUCH_DEFAULT_MAX_WIDTH 720
#define TOUCH_DEFAULT_MAX_HEIGHT 1500
#define TOUCH_MAX_FINGER_NUM 10
#define TOUCH_KEY_NUM 0
#if TOUCH_KEY_NUM > 0
extern const uint16_t touch_key_array[TOUCH_KEY_NUM];
#endif
#define TOUCH_FORCE_NUM 1000
/* Enable only when module have tp reset pin and connected to host */
#define NVT_TOUCH_SUPPORT_HW_RST 0
//---Customerized func.---
#define NVT_TOUCH_PROC 1
#define NVT_TOUCH_EXT_PROC 1
#define NVT_TOUCH_MP 1
#define MT_PROTOCOL_B 1
#define WAKEUP_GESTURE 1
#if WAKEUP_GESTURE
extern const uint16_t gesture_key_array[];
#endif
#define BOOT_UPDATE_FIRMWARE 0
#define BOOT_UPDATE_FIRMWARE_NAME "novatek_ts_fw.bin"
//---ESD Protect.---
#define NVT_TOUCH_ESD_PROTECT 0
#define NVT_TOUCH_ESD_CHECK_PERIOD 1500 /* ms */
//--I2C DMA info.---
#define I2C_DMA_SUPPORT 1
#define DMA_MAX_TRANSACTION_LENGTH 255 // for DMA mode
#define DMA_MAX_I2C_TRANSFER_SIZE (DMA_MAX_TRANSACTION_LENGTH - 1)
#define MAX_TRANSACTION_LENGTH 8
#define MAX_I2C_TRANSFER_SIZE (MAX_TRANSACTION_LENGTH - 1)
struct nvt_ts_data {
struct i2c_client *client;
struct input_dev *input_dev;
struct work_struct nvt_work;
struct delayed_work nvt_fwu_work;
uint16_t addr;
int8_t phys[32];
uint8_t fw_ver;
uint8_t x_num;
uint8_t y_num;
uint16_t abs_x_max;
uint16_t abs_y_max;
uint8_t max_touch_num;
uint8_t max_button_num;
uint32_t int_trigger_type;
int32_t irq_gpio;
uint32_t irq_flags;
int32_t reset_gpio;
uint32_t reset_flags;
struct mutex lock;
const struct nvt_ts_mem_map *mmap;
uint8_t carrier_system;
uint16_t nvt_pid;
};
#if NVT_TOUCH_PROC
struct nvt_flash_data{
rwlock_t lock;
struct i2c_client *client;
};
#endif
typedef enum {
RESET_STATE_INIT = 0xA0,// IC reset
RESET_STATE_REK, // ReK baseline
RESET_STATE_REK_FINISH, // baseline is ready
RESET_STATE_NORMAL_RUN, // normal run
RESET_STATE_MAX = 0xAF
} RST_COMPLETE_STATE;
typedef enum {
EVENT_MAP_HOST_CMD = 0x50,
EVENT_MAP_HANDSHAKING_or_SUB_CMD_BYTE = 0x51,
EVENT_MAP_RESET_COMPLETE = 0x60,
EVENT_MAP_FWINFO = 0x78,
EVENT_MAP_PROJECTID = 0x9A,
} I2C_EVENT_MAP;
//---extern structures---
extern struct nvt_ts_data *ts;
//---extern functions---
extern int32_t CTP_I2C_READ(struct i2c_client *client, uint16_t address, uint8_t *buf, uint16_t len);
extern int32_t CTP_I2C_WRITE(struct i2c_client *client, uint16_t address, uint8_t *buf, uint16_t len);
extern void nvt_bootloader_reset(void);
extern void nvt_sw_reset_idle(void);
extern int32_t nvt_check_fw_reset_state(RST_COMPLETE_STATE check_reset_state);
extern int32_t nvt_get_fw_info(void);
extern int32_t nvt_clear_fw_status(void);
extern int32_t nvt_check_fw_status(void);
#if NVT_TOUCH_ESD_PROTECT
extern void nvt_esd_check_enable(uint8_t enable);
#endif /* #if NVT_TOUCH_ESD_PROTECT */
extern void nvt_stop_crc_reboot(void);
#endif /* _LINUX_NVT_TOUCH_H */
@@ -0,0 +1,625 @@
/*
* Copyright (C) 2010 - 2017 Novatek, Inc.
*
* $Revision: 23179 $
* $Date: 2018-02-12 16:37:16 +0800 (周一, 12 二月 2018) $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
*/
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/delay.h>
#include "nt36xxx.h"
#if NVT_TOUCH_EXT_PROC
#define NVT_FW_VERSION "nvt_fw_version"
#define NVT_BASELINE "nvt_baseline"
#define NVT_RAW "nvt_raw"
#define NVT_DIFF "nvt_diff"
#define I2C_TANSFER_LENGTH 64
#define NORMAL_MODE 0x00
#define TEST_MODE_1 0x21
#define TEST_MODE_2 0x22
#define HANDSHAKING_HOST_READY 0xBB
#define XDATA_SECTOR_SIZE 256
static uint8_t xdata_tmp[2048] = {0};
static int32_t xdata[2048] = {0};
static int32_t xdata_i[2048] = {0};
static int32_t xdata_q[2048] = {0};
static struct proc_dir_entry *NVT_proc_fw_version_entry;
static struct proc_dir_entry *NVT_proc_baseline_entry;
static struct proc_dir_entry *NVT_proc_raw_entry;
static struct proc_dir_entry *NVT_proc_diff_entry;
/*******************************************************
Description:
Novatek touchscreen change mode function.
return:
n.a.
*******************************************************/
void nvt_change_mode(uint8_t mode)
{
uint8_t buf[8] = {0};
//---set xdata index to EVENT BUF ADDR---
buf[0] = 0xFF;
buf[1] = (ts->mmap->EVENT_BUF_ADDR >> 16) & 0xFF;
buf[2] = (ts->mmap->EVENT_BUF_ADDR >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
//---set mode---
buf[0] = EVENT_MAP_HOST_CMD;
buf[1] = mode;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 2);
if (mode == NORMAL_MODE) {
buf[0] = EVENT_MAP_HANDSHAKING_or_SUB_CMD_BYTE;
buf[1] = HANDSHAKING_HOST_READY;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 2);
msleep(20);
}
}
/*******************************************************
Description:
Novatek touchscreen get firmware pipe function.
return:
Executive outcomes. 0---pipe 0. 1---pipe 1.
*******************************************************/
uint8_t nvt_get_fw_pipe(void)
{
uint8_t buf[8]= {0};
//---set xdata index to EVENT BUF ADDR---
buf[0] = 0xFF;
buf[1] = (ts->mmap->EVENT_BUF_ADDR >> 16) & 0xFF;
buf[2] = (ts->mmap->EVENT_BUF_ADDR >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
//---read fw status---
buf[0] = EVENT_MAP_HANDSHAKING_or_SUB_CMD_BYTE;
buf[1] = 0x00;
CTP_I2C_READ(ts->client, I2C_FW_Address, buf, 2);
//NVT_LOG("FW pipe=%d, buf[1]=0x%02X\n", (buf[1]&0x01), buf[1]);
return (buf[1] & 0x01);
}
/*******************************************************
Description:
Novatek touchscreen read meta data function.
return:
n.a.
*******************************************************/
void nvt_read_mdata(uint32_t xdata_addr, uint32_t xdata_btn_addr)
{
int32_t i = 0;
int32_t j = 0;
int32_t k = 0;
uint8_t buf[I2C_TANSFER_LENGTH + 1] = {0};
uint32_t head_addr = 0;
int32_t dummy_len = 0;
int32_t data_len = 0;
int32_t residual_len = 0;
//---set xdata sector address & length---
head_addr = xdata_addr - (xdata_addr % XDATA_SECTOR_SIZE);
dummy_len = xdata_addr - head_addr;
data_len = ts->x_num * ts->y_num * 2;
residual_len = (head_addr + dummy_len + data_len) % XDATA_SECTOR_SIZE;
//printk("head_addr=0x%05X, dummy_len=0x%05X, data_len=0x%05X, residual_len=0x%05X\n", head_addr, dummy_len, data_len, residual_len);
//read xdata : step 1
for (i = 0; i < ((dummy_len + data_len) / XDATA_SECTOR_SIZE); i++) {
//---change xdata index---
buf[0] = 0xFF;
buf[1] = ((head_addr + XDATA_SECTOR_SIZE * i) >> 16) & 0xFF;
buf[2] = ((head_addr + XDATA_SECTOR_SIZE * i) >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
//---read xdata by I2C_TANSFER_LENGTH
for (j = 0; j < (XDATA_SECTOR_SIZE / I2C_TANSFER_LENGTH); j++) {
//---read data---
buf[0] = I2C_TANSFER_LENGTH * j;
CTP_I2C_READ(ts->client, I2C_FW_Address, buf, I2C_TANSFER_LENGTH + 1);
//---copy buf to xdata_tmp---
for (k = 0; k < I2C_TANSFER_LENGTH; k++) {
xdata_tmp[XDATA_SECTOR_SIZE * i + I2C_TANSFER_LENGTH * j + k] = buf[k + 1];
//printk("0x%02X, 0x%04X\n", buf[k+1], (XDATA_SECTOR_SIZE*i + I2C_TANSFER_LENGTH*j + k));
}
}
//printk("addr=0x%05X\n", (head_addr+XDATA_SECTOR_SIZE*i));
}
//read xdata : step2
if (residual_len != 0) {
//---change xdata index---
buf[0] = 0xFF;
buf[1] = ((xdata_addr + data_len - residual_len) >> 16) & 0xFF;
buf[2] = ((xdata_addr + data_len - residual_len) >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
//---read xdata by I2C_TANSFER_LENGTH
for (j = 0; j < (residual_len / I2C_TANSFER_LENGTH + 1); j++) {
//---read data---
buf[0] = I2C_TANSFER_LENGTH * j;
CTP_I2C_READ(ts->client, I2C_FW_Address, buf, I2C_TANSFER_LENGTH + 1);
//---copy buf to xdata_tmp---
for (k = 0; k < I2C_TANSFER_LENGTH; k++) {
xdata_tmp[(dummy_len + data_len - residual_len) + I2C_TANSFER_LENGTH * j + k] = buf[k + 1];
//printk("0x%02X, 0x%04x\n", buf[k+1], ((dummy_len+data_len-residual_len) + I2C_TANSFER_LENGTH*j + k));
}
}
//printk("addr=0x%05X\n", (xdata_addr+data_len-residual_len));
}
//---remove dummy data and 2bytes-to-1data---
for (i = 0; i < (data_len / 2); i++) {
xdata[i] = (int16_t)(xdata_tmp[dummy_len + i * 2] + 256 * xdata_tmp[dummy_len + i * 2 + 1]);
}
#if TOUCH_KEY_NUM > 0
//read button xdata : step3
//---change xdata index---
buf[0] = 0xFF;
buf[1] = (xdata_btn_addr >> 16) & 0xFF;
buf[2] = ((xdata_btn_addr >> 8) & 0xFF);
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
//---read data---
buf[0] = (xdata_btn_addr & 0xFF);
CTP_I2C_READ(ts->client, I2C_FW_Address, buf, (TOUCH_KEY_NUM * 2 + 1));
//---2bytes-to-1data---
for (i = 0; i < TOUCH_KEY_NUM; i++) {
xdata[ts->x_num * ts->y_num + i] = (int16_t)(buf[1 + i * 2] + 256 * buf[1 + i * 2 + 1]);
}
#endif
//---set xdata index to EVENT BUF ADDR---
buf[0] = 0xFF;
buf[1] = (ts->mmap->EVENT_BUF_ADDR >> 16) & 0xFF;
buf[2] = (ts->mmap->EVENT_BUF_ADDR >> 8) & 0xFF;
CTP_I2C_WRITE(ts->client, I2C_FW_Address, buf, 3);
}
/*******************************************************
Description:
Novatek touchscreen read meta data from IQ to rss function.
return:
n.a.
*******************************************************/
void nvt_read_mdata_rss(uint32_t xdata_i_addr, uint32_t xdata_q_addr, uint32_t xdata_btn_i_addr, uint32_t xdata_btn_q_addr)
{
int i = 0;
nvt_read_mdata(xdata_i_addr, xdata_btn_i_addr);
memcpy(xdata_i, xdata, ((ts->x_num * ts->y_num + TOUCH_KEY_NUM) * sizeof(int32_t)));
nvt_read_mdata(xdata_q_addr, xdata_btn_q_addr);
memcpy(xdata_q, xdata, ((ts->x_num * ts->y_num + TOUCH_KEY_NUM) * sizeof(int32_t)));
for (i = 0; i < (ts->x_num * ts->y_num + TOUCH_KEY_NUM); i++) {
xdata[i] = (int32_t)int_sqrt((unsigned long)(xdata_i[i] * xdata_i[i]) + (unsigned long)(xdata_q[i] * xdata_q[i]));
}
}
/*******************************************************
Description:
Novatek touchscreen get meta data function.
return:
n.a.
*******************************************************/
void nvt_get_mdata(int32_t *buf, uint8_t *m_x_num, uint8_t *m_y_num)
{
*m_x_num = ts->x_num;
*m_y_num = ts->y_num;
memcpy(buf, xdata, ((ts->x_num * ts->y_num + TOUCH_KEY_NUM) * sizeof(int32_t)));
}
/*******************************************************
Description:
Novatek touchscreen firmware version show function.
return:
Executive outcomes. 0---succeed.
*******************************************************/
static int32_t c_fw_version_show(struct seq_file *m, void *v)
{
seq_printf(m, "fw_ver=%d, x_num=%d, y_num=%d, button_num=%d\n", ts->fw_ver, ts->x_num, ts->y_num, ts->max_button_num);
return 0;
}
/*******************************************************
Description:
Novatek touchscreen xdata sequence print show
function.
return:
Executive outcomes. 0---succeed.
*******************************************************/
static int32_t c_show(struct seq_file *m, void *v)
{
int32_t i = 0;
int32_t j = 0;
for (i = 0; i < ts->y_num; i++) {
for (j = 0; j < ts->x_num; j++) {
seq_printf(m, "%5d, ", xdata[i * ts->x_num + j]);
}
seq_puts(m, "\n");
}
#if TOUCH_KEY_NUM > 0
for (i = 0; i < TOUCH_KEY_NUM; i++) {
seq_printf(m, "%5d, ", xdata[ts->x_num * ts->y_num + i]);
}
seq_puts(m, "\n");
#endif
seq_printf(m, "\n\n");
return 0;
}
/*******************************************************
Description:
Novatek touchscreen xdata sequence print start
function.
return:
Executive outcomes. 1---call next function.
NULL---not call next function and sequence loop
stop.
*******************************************************/
static void *c_start(struct seq_file *m, loff_t *pos)
{
return *pos < 1 ? (void *)1 : NULL;
}
/*******************************************************
Description:
Novatek touchscreen xdata sequence print next
function.
return:
Executive outcomes. NULL---no next and call sequence
stop function.
*******************************************************/
static void *c_next(struct seq_file *m, void *v, loff_t *pos)
{
++*pos;
return NULL;
}
/*******************************************************
Description:
Novatek touchscreen xdata sequence print stop
function.
return:
n.a.
*******************************************************/
static void c_stop(struct seq_file *m, void *v)
{
return;
}
const struct seq_operations nvt_fw_version_seq_ops = {
.start = c_start,
.next = c_next,
.stop = c_stop,
.show = c_fw_version_show
};
const struct seq_operations nvt_seq_ops = {
.start = c_start,
.next = c_next,
.stop = c_stop,
.show = c_show
};
/*******************************************************
Description:
Novatek touchscreen /proc/nvt_fw_version open
function.
return:
n.a.
*******************************************************/
static int32_t nvt_fw_version_open(struct inode *inode, struct file *file)
{
if (mutex_lock_interruptible(&ts->lock)) {
return -ERESTARTSYS;
}
NVT_LOG("++\n");
#if NVT_TOUCH_ESD_PROTECT
nvt_esd_check_enable(false);
#endif /* #if NVT_TOUCH_ESD_PROTECT */
if (nvt_get_fw_info()) {
mutex_unlock(&ts->lock);
return -EAGAIN;
}
mutex_unlock(&ts->lock);
NVT_LOG("--\n");
return seq_open(file, &nvt_fw_version_seq_ops);
}
static const struct file_operations nvt_fw_version_fops = {
.owner = THIS_MODULE,
.open = nvt_fw_version_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
/*******************************************************
Description:
Novatek touchscreen /proc/nvt_baseline open function.
return:
Executive outcomes. 0---succeed.
*******************************************************/
static int32_t nvt_baseline_open(struct inode *inode, struct file *file)
{
if (mutex_lock_interruptible(&ts->lock)) {
return -ERESTARTSYS;
}
NVT_LOG("++\n");
#if NVT_TOUCH_ESD_PROTECT
nvt_esd_check_enable(false);
#endif /* #if NVT_TOUCH_ESD_PROTECT */
if (nvt_clear_fw_status()) {
mutex_unlock(&ts->lock);
return -EAGAIN;
}
nvt_change_mode(TEST_MODE_2);
if (nvt_check_fw_status()) {
mutex_unlock(&ts->lock);
return -EAGAIN;
}
if (nvt_get_fw_info()) {
mutex_unlock(&ts->lock);
return -EAGAIN;
}
if (ts->carrier_system) {
nvt_read_mdata_rss(ts->mmap->BASELINE_ADDR, ts->mmap->BASELINE_Q_ADDR,
ts->mmap->BASELINE_BTN_ADDR, ts->mmap->BASELINE_BTN_Q_ADDR);
} else {
nvt_read_mdata(ts->mmap->BASELINE_ADDR, ts->mmap->BASELINE_BTN_ADDR);
}
nvt_change_mode(NORMAL_MODE);
mutex_unlock(&ts->lock);
NVT_LOG("--\n");
return seq_open(file, &nvt_seq_ops);
}
static const struct file_operations nvt_baseline_fops = {
.owner = THIS_MODULE,
.open = nvt_baseline_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
/*******************************************************
Description:
Novatek touchscreen /proc/nvt_raw open function.
return:
Executive outcomes. 0---succeed.
*******************************************************/
static int32_t nvt_raw_open(struct inode *inode, struct file *file)
{
if (mutex_lock_interruptible(&ts->lock)) {
return -ERESTARTSYS;
}
NVT_LOG("++\n");
#if NVT_TOUCH_ESD_PROTECT
nvt_esd_check_enable(false);
#endif /* #if NVT_TOUCH_ESD_PROTECT */
if (nvt_clear_fw_status()) {
mutex_unlock(&ts->lock);
return -EAGAIN;
}
nvt_change_mode(TEST_MODE_2);
if (nvt_check_fw_status()) {
mutex_unlock(&ts->lock);
return -EAGAIN;
}
if (nvt_get_fw_info()) {
mutex_unlock(&ts->lock);
return -EAGAIN;
}
if (ts->carrier_system) {
if (nvt_get_fw_pipe() == 0)
nvt_read_mdata_rss(ts->mmap->RAW_PIPE0_ADDR, ts->mmap->RAW_PIPE0_Q_ADDR,
ts->mmap->RAW_BTN_PIPE0_ADDR, ts->mmap->RAW_BTN_PIPE0_Q_ADDR);
else
nvt_read_mdata_rss(ts->mmap->RAW_PIPE1_ADDR, ts->mmap->RAW_PIPE1_Q_ADDR,
ts->mmap->RAW_BTN_PIPE1_ADDR, ts->mmap->RAW_BTN_PIPE1_Q_ADDR);
} else {
if (nvt_get_fw_pipe() == 0)
nvt_read_mdata(ts->mmap->RAW_PIPE0_ADDR, ts->mmap->RAW_BTN_PIPE0_ADDR);
else
nvt_read_mdata(ts->mmap->RAW_PIPE1_ADDR, ts->mmap->RAW_BTN_PIPE1_ADDR);
}
nvt_change_mode(NORMAL_MODE);
mutex_unlock(&ts->lock);
NVT_LOG("--\n");
return seq_open(file, &nvt_seq_ops);
}
static const struct file_operations nvt_raw_fops = {
.owner = THIS_MODULE,
.open = nvt_raw_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
/*******************************************************
Description:
Novatek touchscreen /proc/nvt_diff open function.
return:
Executive outcomes. 0---succeed. negative---failed.
*******************************************************/
static int32_t nvt_diff_open(struct inode *inode, struct file *file)
{
if (mutex_lock_interruptible(&ts->lock)) {
return -ERESTARTSYS;
}
NVT_LOG("++\n");
#if NVT_TOUCH_ESD_PROTECT
nvt_esd_check_enable(false);
#endif /* #if NVT_TOUCH_ESD_PROTECT */
if (nvt_clear_fw_status()) {
mutex_unlock(&ts->lock);
return -EAGAIN;
}
nvt_change_mode(TEST_MODE_2);
if (nvt_check_fw_status()) {
mutex_unlock(&ts->lock);
return -EAGAIN;
}
if (nvt_get_fw_info()) {
mutex_unlock(&ts->lock);
return -EAGAIN;
}
if (ts->carrier_system) {
if (nvt_get_fw_pipe() == 0)
nvt_read_mdata_rss(ts->mmap->DIFF_PIPE0_ADDR, ts->mmap->DIFF_PIPE0_Q_ADDR,
ts->mmap->DIFF_BTN_PIPE0_ADDR, ts->mmap->DIFF_BTN_PIPE0_Q_ADDR);
else
nvt_read_mdata_rss(ts->mmap->DIFF_PIPE1_ADDR, ts->mmap->DIFF_PIPE1_Q_ADDR,
ts->mmap->DIFF_BTN_PIPE1_ADDR, ts->mmap->DIFF_BTN_PIPE1_Q_ADDR);
} else {
if (nvt_get_fw_pipe() == 0)
nvt_read_mdata(ts->mmap->DIFF_PIPE0_ADDR, ts->mmap->DIFF_BTN_PIPE0_ADDR);
else
nvt_read_mdata(ts->mmap->DIFF_PIPE1_ADDR, ts->mmap->DIFF_BTN_PIPE1_ADDR);
}
nvt_change_mode(NORMAL_MODE);
mutex_unlock(&ts->lock);
NVT_LOG("--\n");
return seq_open(file, &nvt_seq_ops);
}
static const struct file_operations nvt_diff_fops = {
.owner = THIS_MODULE,
.open = nvt_diff_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
};
/*******************************************************
Description:
Novatek touchscreen extra function proc. file node
initial function.
return:
Executive outcomes. 0---succeed. -12---failed.
*******************************************************/
int32_t nvt_extra_proc_init(void)
{
NVT_proc_fw_version_entry = proc_create(NVT_FW_VERSION, 0444, NULL,&nvt_fw_version_fops);
if (NVT_proc_fw_version_entry == NULL) {
NVT_ERR("create proc/nvt_fw_version Failed!\n");
return -ENOMEM;
} else {
NVT_LOG("create proc/nvt_fw_version Succeeded!\n");
}
NVT_proc_baseline_entry = proc_create(NVT_BASELINE, 0444, NULL,&nvt_baseline_fops);
if (NVT_proc_baseline_entry == NULL) {
NVT_ERR("create proc/nvt_baseline Failed!\n");
return -ENOMEM;
} else {
NVT_LOG("create proc/nvt_baseline Succeeded!\n");
}
NVT_proc_raw_entry = proc_create(NVT_RAW, 0444, NULL,&nvt_raw_fops);
if (NVT_proc_raw_entry == NULL) {
NVT_ERR("create proc/nvt_raw Failed!\n");
return -ENOMEM;
} else {
NVT_LOG("create proc/nvt_raw Succeeded!\n");
}
NVT_proc_diff_entry = proc_create(NVT_DIFF, 0444, NULL,&nvt_diff_fops);
if (NVT_proc_diff_entry == NULL) {
NVT_ERR("create proc/nvt_diff Failed!\n");
return -ENOMEM;
} else {
NVT_LOG("create proc/nvt_diff Succeeded!\n");
}
return 0;
}
#endif
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,207 @@
/*
* Copyright (C) 2010 - 2017 Novatek, Inc.
*
* $Revision: 19587 $
* $Date: 2017-11-28 21:00:30 +0800 (周二, 28 十一月 2017) $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
*/
struct nvt_ts_mem_map {
uint32_t EVENT_BUF_ADDR;
uint32_t RAW_PIPE0_ADDR;
uint32_t RAW_PIPE0_Q_ADDR;
uint32_t RAW_PIPE1_ADDR;
uint32_t RAW_PIPE1_Q_ADDR;
uint32_t BASELINE_ADDR;
uint32_t BASELINE_Q_ADDR;
uint32_t BASELINE_BTN_ADDR;
uint32_t BASELINE_BTN_Q_ADDR;
uint32_t DIFF_PIPE0_ADDR;
uint32_t DIFF_PIPE0_Q_ADDR;
uint32_t DIFF_PIPE1_ADDR;
uint32_t DIFF_PIPE1_Q_ADDR;
uint32_t RAW_BTN_PIPE0_ADDR;
uint32_t RAW_BTN_PIPE0_Q_ADDR;
uint32_t RAW_BTN_PIPE1_ADDR;
uint32_t RAW_BTN_PIPE1_Q_ADDR;
uint32_t DIFF_BTN_PIPE0_ADDR;
uint32_t DIFF_BTN_PIPE0_Q_ADDR;
uint32_t DIFF_BTN_PIPE1_ADDR;
uint32_t DIFF_BTN_PIPE1_Q_ADDR;
uint32_t READ_FLASH_CHECKSUM_ADDR;
uint32_t RW_FLASH_DATA_ADDR;
};
static const struct nvt_ts_mem_map NT36672A_memory_map = {
.EVENT_BUF_ADDR = 0x21C00,
.RAW_PIPE0_ADDR = 0x20000,
.RAW_PIPE0_Q_ADDR = 0,
.RAW_PIPE1_ADDR = 0x23000,
.RAW_PIPE1_Q_ADDR = 0,
.BASELINE_ADDR = 0x20BFC,
.BASELINE_Q_ADDR = 0,
.BASELINE_BTN_ADDR = 0x23BFC,
.BASELINE_BTN_Q_ADDR = 0,
.DIFF_PIPE0_ADDR = 0x206DC,
.DIFF_PIPE0_Q_ADDR = 0,
.DIFF_PIPE1_ADDR = 0x236DC,
.DIFF_PIPE1_Q_ADDR = 0,
.RAW_BTN_PIPE0_ADDR = 0x20510,
.RAW_BTN_PIPE0_Q_ADDR = 0,
.RAW_BTN_PIPE1_ADDR = 0x23510,
.RAW_BTN_PIPE1_Q_ADDR = 0,
.DIFF_BTN_PIPE0_ADDR = 0x20BF0,
.DIFF_BTN_PIPE0_Q_ADDR = 0,
.DIFF_BTN_PIPE1_ADDR = 0x23BF0,
.DIFF_BTN_PIPE1_Q_ADDR = 0,
.READ_FLASH_CHECKSUM_ADDR = 0x24000,
.RW_FLASH_DATA_ADDR = 0x24002,
};
static const struct nvt_ts_mem_map NT36772_memory_map = {
.EVENT_BUF_ADDR = 0x11E00,
.RAW_PIPE0_ADDR = 0x10000,
.RAW_PIPE0_Q_ADDR = 0,
.RAW_PIPE1_ADDR = 0x12000,
.RAW_PIPE1_Q_ADDR = 0,
.BASELINE_ADDR = 0x10E70,
.BASELINE_Q_ADDR = 0,
.BASELINE_BTN_ADDR = 0x12E70,
.BASELINE_BTN_Q_ADDR = 0,
.DIFF_PIPE0_ADDR = 0x10830,
.DIFF_PIPE0_Q_ADDR = 0,
.DIFF_PIPE1_ADDR = 0x12830,
.DIFF_PIPE1_Q_ADDR = 0,
.RAW_BTN_PIPE0_ADDR = 0x10E60,
.RAW_BTN_PIPE0_Q_ADDR = 0,
.RAW_BTN_PIPE1_ADDR = 0x12E60,
.RAW_BTN_PIPE1_Q_ADDR = 0,
.DIFF_BTN_PIPE0_ADDR = 0x10E68,
.DIFF_BTN_PIPE0_Q_ADDR = 0,
.DIFF_BTN_PIPE1_ADDR = 0x12E68,
.DIFF_BTN_PIPE1_Q_ADDR = 0,
.READ_FLASH_CHECKSUM_ADDR = 0x14000,
.RW_FLASH_DATA_ADDR = 0x14002,
};
static const struct nvt_ts_mem_map NT36525_memory_map = {
.EVENT_BUF_ADDR = 0x11A00,
.RAW_PIPE0_ADDR = 0x10000,
.RAW_PIPE0_Q_ADDR = 0,
.RAW_PIPE1_ADDR = 0x12000,
.RAW_PIPE1_Q_ADDR = 0,
.BASELINE_ADDR = 0x10B08,
.BASELINE_Q_ADDR = 0,
.BASELINE_BTN_ADDR = 0x12B08,
.BASELINE_BTN_Q_ADDR = 0,
.DIFF_PIPE0_ADDR = 0x1064C,
.DIFF_PIPE0_Q_ADDR = 0,
.DIFF_PIPE1_ADDR = 0x1264C,
.DIFF_PIPE1_Q_ADDR = 0,
.RAW_BTN_PIPE0_ADDR = 0x10634,
.RAW_BTN_PIPE0_Q_ADDR = 0,
.RAW_BTN_PIPE1_ADDR = 0x12634,
.RAW_BTN_PIPE1_Q_ADDR = 0,
.DIFF_BTN_PIPE0_ADDR = 0x10AFC,
.DIFF_BTN_PIPE0_Q_ADDR = 0,
.DIFF_BTN_PIPE1_ADDR = 0x12AFC,
.DIFF_BTN_PIPE1_Q_ADDR = 0,
.READ_FLASH_CHECKSUM_ADDR = 0x14000,
.RW_FLASH_DATA_ADDR = 0x14002,
};
static const struct nvt_ts_mem_map NT36870_memory_map = {
.EVENT_BUF_ADDR = 0x25000,
.RAW_PIPE0_ADDR = 0x20000,
.RAW_PIPE0_Q_ADDR = 0x204C8,
.RAW_PIPE1_ADDR = 0x23000,
.RAW_PIPE1_Q_ADDR = 0x234C8,
.BASELINE_ADDR = 0x21350,
.BASELINE_Q_ADDR = 0x21818,
.BASELINE_BTN_ADDR = 0x24350,
.BASELINE_BTN_Q_ADDR = 0x24358,
.DIFF_PIPE0_ADDR = 0x209B0,
.DIFF_PIPE0_Q_ADDR = 0x20E78,
.DIFF_PIPE1_ADDR = 0x239B0,
.DIFF_PIPE1_Q_ADDR = 0x23E78,
.RAW_BTN_PIPE0_ADDR = 0x20990,
.RAW_BTN_PIPE0_Q_ADDR = 0x20998,
.RAW_BTN_PIPE1_ADDR = 0x23990,
.RAW_BTN_PIPE1_Q_ADDR = 0x23998,
.DIFF_BTN_PIPE0_ADDR = 0x21340,
.DIFF_BTN_PIPE0_Q_ADDR = 0x21348,
.DIFF_BTN_PIPE1_ADDR = 0x24340,
.DIFF_BTN_PIPE1_Q_ADDR = 0x24348,
.READ_FLASH_CHECKSUM_ADDR = 0x24000,
.RW_FLASH_DATA_ADDR = 0x24002,
};
static const struct nvt_ts_mem_map NT36676F_memory_map = {
.EVENT_BUF_ADDR = 0x11A00,
.RAW_PIPE0_ADDR = 0x10000,
.RAW_PIPE0_Q_ADDR = 0,
.RAW_PIPE1_ADDR = 0x12000,
.RAW_PIPE1_Q_ADDR = 0,
.BASELINE_ADDR = 0x10B08,
.BASELINE_Q_ADDR = 0,
.BASELINE_BTN_ADDR = 0x12B08,
.BASELINE_BTN_Q_ADDR = 0,
.DIFF_PIPE0_ADDR = 0x1064C,
.DIFF_PIPE0_Q_ADDR = 0,
.DIFF_PIPE1_ADDR = 0x1264C,
.DIFF_PIPE1_Q_ADDR = 0,
.RAW_BTN_PIPE0_ADDR = 0x10634,
.RAW_BTN_PIPE0_Q_ADDR = 0,
.RAW_BTN_PIPE1_ADDR = 0x12634,
.RAW_BTN_PIPE1_Q_ADDR = 0,
.DIFF_BTN_PIPE0_ADDR = 0x10AFC,
.DIFF_BTN_PIPE0_Q_ADDR = 0,
.DIFF_BTN_PIPE1_ADDR = 0x12AFC,
.DIFF_BTN_PIPE1_Q_ADDR = 0,
.READ_FLASH_CHECKSUM_ADDR = 0x14000,
.RW_FLASH_DATA_ADDR = 0x14002,
};
#define NVT_ID_BYTE_MAX 6
struct nvt_ts_trim_id_table {
uint8_t id[NVT_ID_BYTE_MAX];
uint8_t mask[NVT_ID_BYTE_MAX];
const struct nvt_ts_mem_map *mmap;
uint8_t carrier_system;
};
static const struct nvt_ts_trim_id_table trim_id_table[] = {
{.id = {0x0A, 0xFF, 0xFF, 0x72, 0x66, 0x03}, .mask = {1, 0, 0, 1, 1, 1},
.mmap = &NT36672A_memory_map, .carrier_system = 0},
{.id = {0x55, 0x00, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0x55, 0x72, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xAA, 0x00, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xAA, 0x72, 0xFF, 0x00, 0x00, 0x00}, .mask = {1, 1, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x72, 0x67, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x70, 0x66, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x70, 0x67, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x72, 0x66, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36772_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x25, 0x65, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36525_memory_map, .carrier_system = 0},
{.id = {0xFF, 0xFF, 0xFF, 0x70, 0x68, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36870_memory_map, .carrier_system = 1},
{.id = {0xFF, 0xFF, 0xFF, 0x76, 0x66, 0x03}, .mask = {0, 0, 0, 1, 1, 1},
.mmap = &NT36676F_memory_map, .carrier_system = 0}
};
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,719 @@
/*
* Copyright (C) 2010 - 2017 Novatek, Inc.
*
* $Revision: 19587 $
* $Date: 2017-11-28 21:00:30 +0800 (周二, 28 十一月 2017) $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
*/
#if NVT_TOUCH_MP
static uint32_t IC_X_CFG_SIZE = 18;
static uint32_t IC_Y_CFG_SIZE = 32;
static uint32_t IC_KEY_CFG_SIZE = 4;
static uint32_t X_Channel = 18;
static uint32_t Y_Channel = 32;
static uint32_t Key_Channel = TOUCH_KEY_NUM;
static uint8_t AIN_X[40] = {17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
static uint8_t AIN_Y[40] = {31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
#if TOUCH_KEY_NUM > 0
static uint8_t AIN_KEY[8] = {0, 1, 2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
#endif /* #if TOUCH_KEY_NUM > 0 */
static int32_t PS_Config_Lmt_Short_Rawdata_P[40 * 40] = {
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,20000,
#if TOUCH_KEY_NUM > 0
20000,20000,20000,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Short_Rawdata_N[40 * 40] = {
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,11550,
#if TOUCH_KEY_NUM > 0
11550,11550,11550,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Short_Diff_P[40 * 40] = {
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,6300,
#if TOUCH_KEY_NUM > 0
6300,6300,6300,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Short_Diff_N[40 * 40] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
#if TOUCH_KEY_NUM > 0
0,0,0,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Short_Base_P[40 * 40] = {
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
#if TOUCH_KEY_NUM > 0
2000,2000,2000,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Short_Base_N[40 * 40] = {
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,-2000,
#if TOUCH_KEY_NUM > 0
-2000,-2000,-2000,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Open_Rawdata_P[40 * 40] = {
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,13000,
#if TOUCH_KEY_NUM > 0
13000,13000,13000,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_Open_Rawdata_N[40 * 40] = {
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,6500,
#if TOUCH_KEY_NUM > 0
6500,6500,6500,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_Rawdata_P[40 * 40] = {
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,2000,
#if TOUCH_KEY_NUM > 0
2000,2000,2000,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_Rawdata_N[40 * 40] = {
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,
#if TOUCH_KEY_NUM > 0
400,400,400,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_CC_P[40 * 40] = {
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,
#if TOUCH_KEY_NUM > 0
38,38,38,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_CC_N[40 * 40] = {
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
#if TOUCH_KEY_NUM > 0
9,9,9,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_CC_I_P[40 * 40] = {
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
#if TOUCH_KEY_NUM > 0
25,25,25,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_CC_I_N[40 * 40] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
#if TOUCH_KEY_NUM > 0
0,0,0,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_CC_Q_P[40 * 40] = {
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,
#if TOUCH_KEY_NUM > 0
25,25,25,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_CC_Q_N[40 * 40] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
#if TOUCH_KEY_NUM > 0
0,0,0,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_Diff_P[40 * 40] = {
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,
#if TOUCH_KEY_NUM > 0
35,35,35,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Lmt_FW_Diff_N[40 *40] = {
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,-35,
#if TOUCH_KEY_NUM > 0
-35,-35,-35,
#endif /* #if TOUCH_KEY_NUM > 0 */
};
static int32_t PS_Config_Diff_Test_Frame = 50;
#endif /* #if NVT_TOUCH_MP */
@@ -0,0 +1,182 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2019 MediaTek Inc.
*/
#ifndef __TPD_H
#define __TPD_H
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/time.h>
#include <linux/types.h>
#include <linux/seq_file.h>
#include <linux/list.h>
#include <linux/proc_fs.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/platform_device.h>
#include <generated/autoconf.h>
#include <linux/kobject.h>
#include <linux/regulator/consumer.h>
/*debug macros */
#define TPD_DEBUG
#define TPD_DEBUG_CODE
/* #define TPD_DEBUG_TRACK */
#define TPD_DMESG(a, arg...) \
pr_info(TPD_DEVICE ":[%s:%d] " a, __func__, __LINE__, ##arg)
#if defined(TPD_DEBUG)
#undef TPD_DEBUG
#define TPD_DEBUG(a, arg...) \
pr_info(TPD_DEVICE ":[%s:%d] " a, __func__, __LINE__, ##arg)
#else
#define TPD_DEBUG(arg...)
#endif
#define SPLIT ", "
/* register, address, configurations */
#define TPD_DEVICE "mtk-tpd"
#define TPD_X 0
#define TPD_Y 1
#define TPD_Z1 2
#define TPD_Z2 3
#define TP_DELAY (2*HZ/100)
#define TP_DRV_MAX_COUNT (20)
#define TPD_WARP_CNT (4)
#define TPD_VIRTUAL_KEY_MAX (10)
/* various mode */
#define TPD_MODE_NORMAL 0
#define TPD_MODE_KEYPAD 1
#define TPD_MODE_SW 2
#define TPD_MODE_FAV_SW 3
#define TPD_MODE_FAV_HW 4
#define TPD_MODE_RAW_DATA 5
#undef TPD_RES_X
#undef TPD_RES_Y
extern unsigned long TPD_RES_X;
extern unsigned long TPD_RES_Y;
extern int tpd_load_status; /* 0: failed, 1: success */
extern int tpd_mode;
extern int tpd_mode_axis;
extern int tpd_mode_min;
extern int tpd_mode_max;
extern int tpd_mode_keypad_tolerance;
extern int tpd_em_debounce_time;
extern int tpd_em_debounce_time0;
extern int tpd_em_debounce_time1;
extern int tpd_em_asamp;
extern int tpd_em_auto_time_interval;
extern int tpd_em_sample_cnt;
extern int tpd_calmat[];
extern int tpd_def_calmat[];
extern int tpd_calmat[];
extern int tpd_def_calmat[];
extern int TPD_DO_WARP;
extern int tpd_wb_start[];
extern int tpd_wb_end[];
extern int tpd_v_magnify_x;
extern int tpd_v_magnify_y;
extern unsigned int DISP_GetScreenHeight(void);
extern unsigned int DISP_GetScreenWidth(void);
#if defined(CONFIG_MTK_S3320) || defined(CONFIG_MTK_S3320_47) || \
defined(CONFIG_MTK_S3320_50)
extern void synaptics_init_sysfs(void);
#endif /* CONFIG_MTK_S3320 */
extern void tpd_button_init(void);
struct tpd_device {
struct device *tpd_dev;
struct regulator *reg;
struct regulator *io_reg;
struct input_dev *dev;
struct input_dev *kpd;
struct timer_list timer;
struct tasklet_struct tasklet;
int btn_state;
};
struct tpd_key_dim_local {
int key_x;
int key_y;
int key_width;
int key_height;
};
struct tpd_filter_t {
int enable; /*0: disable, 1: enable*/
int pixel_density; /*XXX pixel/cm*/
int W_W[3][4];/*filter custom setting prameters*/
unsigned int VECLOCITY_THRESHOLD[3];/*filter speed custom settings*/
};
struct tpd_dts_info {
int tpd_resolution[2];
int touch_max_num;
int use_tpd_button;
int tpd_key_num;
int tpd_key_local[4];
bool tpd_use_ext_gpio;
int rst_ext_gpio_num;
int rst_gpio_num;
int eint_gpio_num;
struct tpd_key_dim_local tpd_key_dim_local[4];
struct tpd_filter_t touch_filter;
};
extern struct tpd_dts_info tpd_dts_data;
struct tpd_attrs {
struct device_attribute **attr;
int num;
};
struct tpd_driver_t {
char *tpd_device_name;
int (*tpd_local_init)(void);
void (*suspend)(struct device *h);
void (*resume)(struct device *h);
int tpd_have_button;
struct tpd_attrs attrs;
};
void tpd_button(unsigned int x, unsigned int y, unsigned int down);
void tpd_button_init(void);
ssize_t tpd_virtual_key(char *buf);
/* #ifndef TPD_BUTTON_HEIGHT */
/* #define TPD_BUTTON_HEIGHT TPD_RES_Y */
/* #endif */
extern int tpd_driver_add(struct tpd_driver_t *tpd_drv);
extern int tpd_driver_remove(struct tpd_driver_t *tpd_drv);
void tpd_button_setting(int keycnt, void *keys, void *keys_dim);
extern int tpd_em_spl_num;
extern int tpd_em_pressure_threshold;
extern struct tpd_device *tpd;
extern struct tpd_dts_info tpd_dts_data;
extern void tpd_get_dts_info(void);
#define GTP_RST_PORT 0
#define GTP_INT_PORT 1
extern void tpd_gpio_as_int(int pin);
extern void tpd_gpio_output(int pin, int level);
extern const struct of_device_id touch_of_match[];
#ifdef TPD_DEBUG_CODE
#include "tpd_debug.h"
#endif
#ifdef TPD_DEBUG_TRACK
int DAL_Clean(void);
int DAL_Printf(const char *fmt, ...);
int LCD_LayerEnable(int id, BOOL enable);
#endif
#ifdef TPD_HAVE_CALIBRATION
#include "tpd_calibrate.h"
#endif
#include "tpd_default.h"
/* switch touch panel into different mode */
void _tpd_switch_single_mode(void);
void _tpd_switch_multiple_mode(void);
void _tpd_switch_sleep_mode(void);
void _tpd_switch_normal_mode(void);
#endif
@@ -0,0 +1,123 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2019 MediaTek Inc.
*/
#include "tpd.h"
/* #ifdef TPD_HAVE_BUTTON */
/* static int tpd_keys[TPD_KEY_COUNT] = TPD_KEYS; */
/* static int tpd_keys_dim[TPD_KEY_COUNT][4] = TPD_KEYS_DIM; */
static unsigned int tpd_keycnt;
static int tpd_keys[TPD_VIRTUAL_KEY_MAX] = { 0 };
static int tpd_keys_dim[TPD_VIRTUAL_KEY_MAX][4]; /* = {0}; */
static ssize_t mtk_virtual_keys_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
int i, j;
for (i = 0, j = 0; i < tpd_keycnt; i++)
j += snprintf(buf+j, PAGE_SIZE-j, "%s%s:%d:%d:%d:%d:%d%s", buf,
__stringify(EV_KEY), tpd_keys[i],
tpd_keys_dim[i][0], tpd_keys_dim[i][1],
tpd_keys_dim[i][2], tpd_keys_dim[i][3],
(i == tpd_keycnt - 1 ? "\n" : ":"));
return j;
}
static struct kobj_attribute mtk_virtual_keys_attr = {
.attr = {
.name = "virtualkeys.mtk-tpd",
.mode = 0644,
},
.show = &mtk_virtual_keys_show,
};
static struct attribute *mtk_properties_attrs[] = {
&mtk_virtual_keys_attr.attr,
NULL
};
static struct attribute_group mtk_properties_attr_group = {
.attrs = mtk_properties_attrs,
};
struct kobject *properties_kobj;
void tpd_button_init(void)
{
int ret = 0, i = 0;
/* if((tpd->kpd=input_allocate_device())==NULL) return -ENOMEM; */
tpd->kpd = input_allocate_device();
/* struct input_dev kpd initialization and registration */
tpd->kpd->name = TPD_DEVICE "-kpd";
set_bit(EV_KEY, tpd->kpd->evbit);
/* set_bit(EV_REL, tpd->kpd->evbit); */
/* set_bit(EV_ABS, tpd->kpd->evbit); */
for (i = 0; i < tpd_keycnt; i++)
__set_bit(tpd_keys[i], tpd->kpd->keybit);
tpd->kpd->id.bustype = BUS_HOST;
tpd->kpd->id.vendor = 0x0001;
tpd->kpd->id.product = 0x0001;
tpd->kpd->id.version = 0x0100;
if (input_register_device(tpd->kpd))
TPD_DMESG("input_register_device failed.(kpd)\n");
set_bit(EV_KEY, tpd->dev->evbit);
for (i = 0; i < tpd_keycnt; i++)
__set_bit(tpd_keys[i], tpd->dev->keybit);
properties_kobj = kobject_create_and_add("board_properties", NULL);
if (properties_kobj)
ret = sysfs_create_group(properties_kobj,
&mtk_properties_attr_group);
if (!properties_kobj || ret)
TPD_DEBUG("failed to create board_properties\n");
}
void tpd_button(unsigned int x, unsigned int y, unsigned int down)
{
int i;
bool report;
if (down) {
for (i = 0; i < tpd_keycnt; i++) {
report = x >= tpd_keys_dim[i][0] -
(tpd_keys_dim[i][2] / 2) &&
x <= tpd_keys_dim[i][0] +
(tpd_keys_dim[i][2] / 2) &&
y >= tpd_keys_dim[i][1] -
(tpd_keys_dim[i][3] / 2) &&
y <= tpd_keys_dim[i][1] +
(tpd_keys_dim[i][3] / 2) &&
!(tpd->btn_state & (1 << i));
if (report) {
input_report_key(tpd->kpd, tpd_keys[i], 1);
input_sync(tpd->kpd);
tpd->btn_state |= (1 << i);
TPD_DEBUG("press key %d (%d)\n",
i, tpd_keys[i]);
}
}
} else {
for (i = 0; i < tpd_keycnt; i++) {
if (tpd->btn_state & (1 << i)) {
input_report_key(tpd->kpd, tpd_keys[i], 0);
input_sync(tpd->kpd);
TPD_DEBUG("release key %d (%d)\n",
i, tpd_keys[i]);
}
}
tpd->btn_state = 0;
}
}
void tpd_button_setting(int keycnt, void *keys, void *keys_dim)
{
tpd_keycnt = keycnt;
memcpy(tpd_keys, keys, keycnt * 4);
memcpy(tpd_keys_dim, keys_dim, keycnt * 4 * 4);
}
/* #endif */
@@ -0,0 +1,144 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2019 MediaTek Inc.
*/
#ifndef TPD_DEBUG_H
#define TPD_DEBUG_H
#ifdef TPD_DEBUG_CODE
#include<linux/i2c.h>
extern int tpd_debug_nr;
void tpd_debug_set_time(void);
extern int tpd_debug_time;
extern long tpd_last_2_int_time[2];
extern long tpd_last_down_time;
extern int tpd_start_profiling;
extern int tpd_down_status;
#define TPD_DEBUG_PRINT_INT \
do { \
if (tpd_debug_time) { \
pr_info("tp_int\n"); \
} \
} while (0)
#define TPD_DEBUG_PRINT_UP \
do { \
if (pending == 0 && tpd_debug_time) { \
tpd_down_status = 0; \
pr_debug("up on %ld ms (+%ld ms)\n", \
(tpd_last_2_int_time[1] - tpd_last_down_time) / 1000, \
(tpd_last_2_int_time[1] - tpd_last_2_int_time[0]) / 1000); \
} \
} while (0)
#define TPD_DEBUG_PRINT_DOWN \
do { \
if (tpd_debug_time) { \
if (tpd_down_status == 0)\
pr_debug("down on 0 ms\n"); \
else \
pr_debug("move on %ld ms (+%ld ms)\n", \
(tpd_last_2_int_time[1] - \
tpd_last_down_time) / 1000, \
(tpd_last_2_int_time[1] -\
tpd_last_2_int_time[0]) / 1000); \
tpd_down_status = 1; \
} \
} while (0)
#define TPD_DEBUG_SET_TIME do { tpd_debug_set_time(); } while (0)
extern int tpd_em_log;
extern int tpd_em_log_to_fs;
extern int tpd_type_cap;
void tpd_em_log_output(int raw_x,
int raw_y, int cal_x, int cal_y, int p, int down);
void tpd_em_log_store(int raw_x,
int raw_y, int cal_x, int cal_y, int p, int down);
void tpd_em_log_release(void);
void tpd_enable_em_log(int enable);
#ifndef CREATE_TRACE_POINTS
#define CREATE_TRACE_POINTS
#endif
noinline void MET_touch(int raw_x, int raw_y,
int cal_x, int cal_y, int p, int down);
#define TPD_TYPE_RAW_DATA 2
#define TPD_TYPE_INT_DOWN 3
#define TPD_TYPE_INT_UP 4
#define TPD_TYPE_TIMER 5
#define TPD_TYPE_REJECT1 6
#define TPD_TYPE_REJECT2 7
#define TPD_TYPE_FIST_LATENCY 8
#define TPD_EM_PRINT(raw_x, raw_y, cal_x, cal_y, p, down)\
do { \
if (tpd_em_log) {\
if (!tpd_em_log_to_fs) { \
tpd_em_log_output(raw_x, \
raw_y, cal_x, cal_y, p, down); \
} else { \
tpd_em_log_store(raw_x, \
raw_y, cal_x, cal_y, p, down); \
tpd_em_log_output(raw_x, \
raw_y, cal_x, cal_y, p, down); \
} \
} else { \
if (tpd_em_log_to_fs) { \
tpd_em_log_release(); \
} \
} \
MET_touch(raw_x, raw_y, cal_x, cal_y, p, down); \
} while (0)
#ifdef TPD_DEBUG_TRACK
extern void *dal_fb_addr;
extern int tpd_debug_track;
void tpd_up_debug_track(int x, int y);
void tpd_down_debug_track(int x, int y);
#define TPD_UP_DEBUG_TRACK(x, y) \
do { \
if (tpd_debug_track) \
tpd_up_debug_track(x, y); \
} while (0)
#define TPD_DOWN_DEBUG_TRACK(x, y) \
do { \
if (tpd_debug_track) \
tpd_down_debug_track(x, y); \
} while (0)
#endif /* TPD_DEBUG_TRACK */
#endif /* TPD_DEBUG_CODE */
/* Macros that will be embedded in code */
#ifndef TPD_DEBUG_SET_TIME
#define TPD_DEBUG_SET_TIME
#endif
#ifndef TPD_DEBUG_PRINT_UP
#define TPD_DEBUG_PRINT_UP
#endif
#ifndef TPD_DEBUG_PRINT_DOWN
#define TPD_DEBUG_PRINT_DOWN
#endif
#ifndef TPD_UP_DEBUG_TRACK
#define TPD_UP_DEBUG_TRACK(x, y)
#endif
#ifndef TPD_DOWN_DEBUG_TRACK
#define TPD_DOWN_DEBUG_TRACK(x, y)
#endif
#endif /* TPD_DEBUG_H */
@@ -0,0 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2019 MediaTek Inc.
*/
#ifndef TPD_FAT_TOUCH
#define TPD_FAT_TOUCH 120
#endif
int tpd_trembling_tolerance(int t, int p);
@@ -0,0 +1,69 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2019 MediaTek Inc.
*/
#include "tpd.h"
unsigned long TPD_RES_X = 480;
unsigned long TPD_RES_Y = 800;
/* #if (defined(TPD_HAVE_CALIBRATION) && !defined(TPD_CUSTOM_CALIBRATION)) */
int tpd_calmat[8] = { 0 };
int tpd_def_calmat[8] = { 0 };
int tpd_calmat_size = 8;
int tpd_def_calmat_size = 8;
module_param_array(tpd_calmat, int, &tpd_calmat_size, 0664);
module_param_array(tpd_def_calmat, int, &tpd_def_calmat_size, 0444);
/* #endif */
/* #ifdef TPD_TYPE_CAPACITIVE */
int tpd_type_cap;
int tpd_v_magnify_x = 10;
int tpd_v_magnify_y = 10;
module_param(tpd_v_magnify_x, int, 0664);
module_param(tpd_v_magnify_y, int, 0664);
module_param(tpd_type_cap, int, 0444);
int tpd_firmware_version[2] = { 0, 0 };
int tpd_firmware_version_size = 2;
module_param_array(tpd_firmware_version, int, &tpd_firmware_version_size, 0444);
int tpd_mode = TPD_MODE_NORMAL;
int tpd_mode_axis;
int tpd_mode_min = 400; /* TPD_RES_Y/2; */
int tpd_mode_max = 800; /* TPD_RES_Y; */
/* TPD_RES_X*TPD_RES_X/1600; */
int tpd_mode_keypad_tolerance = 480 * 480 / 1600;
module_param(tpd_mode, int, 0664);
module_param(tpd_mode_axis, int, 0664);
module_param(tpd_mode_min, int, 0664);
module_param(tpd_mode_max, int, 0664);
module_param(tpd_mode_keypad_tolerance, int, 0664);
int tpd_em_debounce_time0 = 1;
int tpd_em_debounce_time; /* =0 */
int tpd_em_debounce_time1 = 4;
module_param(tpd_em_debounce_time0, int, 0664);
module_param(tpd_em_debounce_time1, int, 0664);
module_param(tpd_em_debounce_time, int, 0664);
int tpd_em_spl_num = 1;
module_param(tpd_em_spl_num, int, 0664);
int tpd_em_pressure_threshold;
module_param(tpd_em_pressure_threshold, int, 0664);
int tpd_em_auto_time_interval = 10;
module_param(tpd_em_auto_time_interval, int, 0664);
int tpd_em_sample_cnt = 16;
module_param(tpd_em_sample_cnt, int, 0664);
int tpd_load_status;
module_param(tpd_load_status, int, 0664);
int tpd_em_asamp = 1;
module_param(tpd_em_asamp, int, 0664);