From 27c50c5cefea5379faea1cb2b0b2daf493269cc4 Mon Sep 17 00:00:00 2001 From: August Date: Fri, 27 Jul 2018 18:50:18 +0800 Subject: [PATCH] ft5x tp support Signed-off-by: August --- .../linux-4.9/drivers/input/touchscreen/ftxxxx/ft5x.c | 10 +++++----- .../sun50iw1p1/configs/m64/sys_config_linux-4.9.fex | 9 ++++----- 2 files changed, 9 insertions(+), 10 deletions(-) mode change 100644 => 100755 lichee/linux-4.9/drivers/input/touchscreen/ftxxxx/ft5x.c diff --git a/lichee/linux-4.9/drivers/input/touchscreen/ftxxxx/ft5x.c b/lichee/linux-4.9/drivers/input/touchscreen/ftxxxx/ft5x.c old mode 100644 new mode 100755 index a2a0e728db..1895c837c4 --- a/lichee/linux-4.9/drivers/input/touchscreen/ftxxxx/ft5x.c +++ b/lichee/linux-4.9/drivers/input/touchscreen/ftxxxx/ft5x.c @@ -43,10 +43,6 @@ #include #include "../../init-input.h" - - -#define CONFIG_SUPPORT_FTS_CTP_UPG - #define FOR_TSLIB_TEST #ifdef TOUCH_KEY_SUPPORT #define TOUCH_KEY_FOR_EVB13 @@ -131,6 +127,7 @@ enum{ #define dprintk(level_mask,fmt,arg...) if(unlikely(debug_mask & level_mask)) \ printk("***CTP***"fmt, ## arg) + module_param_named(debug_mask,debug_mask,int,S_IRUGO | S_IWUSR | S_IWGRP); /*********************************************************************************************/ /*------------------------------------------------------------------------------------------*/ @@ -1873,7 +1870,9 @@ static long aw_ioctl(struct file *file, unsigned int cmd,unsigned long arg ) switch (cmd) { case UPGRADE: dprintk(DEBUG_OTHERS_INFO,"==UPGRADE_WORK=\n"); +#ifdef CONFIG_SUPPORT_FTS_CTP_UPG fts_ctpm_fw_upgrade_with_i_file(); +#endif // calibrate(); break; default: @@ -1943,7 +1942,8 @@ static int __init ft5x_ts_init(void) input_set_power_enable(&(config_info.input_type), 1); msleep(10); ctp_wakeup(0, 10); - + + msleep(10); ft5x_ts_driver.detect = ctp_detect; ret= register_chrdev(I2C_MAJOR,"aw_i2c_ts",&aw_i2c_ts_fops ); diff --git a/lichee/tools/pack/chips/sun50iw1p1/configs/m64/sys_config_linux-4.9.fex b/lichee/tools/pack/chips/sun50iw1p1/configs/m64/sys_config_linux-4.9.fex index 8610ec5422..b65d25d91d 100755 --- a/lichee/tools/pack/chips/sun50iw1p1/configs/m64/sys_config_linux-4.9.fex +++ b/lichee/tools/pack/chips/sun50iw1p1/configs/m64/sys_config_linux-4.9.fex @@ -390,19 +390,18 @@ rtp_exchange_x_y_flag = 0 ;---------------------------------------------------------------------------------- [ctp] compatible = "allwinner,sun50i-ctp-para" -ctp_used = 0 +ctp_used = 1 ctp_name = "ft5x_ts" -;ctp_name = "gsl1680e_801YDT" ctp_twi_id = 0 ctp_twi_addr = 0x38 ctp_screen_max_x = 800 -ctp_screen_max_y = 1280 +ctp_screen_max_y = 480 ctp_revert_x_flag = 0 ctp_revert_y_flag = 0 ctp_exchange_x_y_flag = 0 ctp_int_port = port:PH04<6> -ctp_wakeup = port:PH08<1><1> +ctp_wakeup = port:PH08<1> ctp_power_ldo = "vcc-ctp" ctp_power_ldo_vol = 3300 ctp_power_io = @@ -414,7 +413,7 @@ ctp_power_io = ;-------------------------------------------------------------------------------- [ctp_list] compatible = "allwinner,sun50i-ctp-list" -ctp_list_used = 0 +ctp_list_used = 1 ft5x16_ts = 1 gslX680new = 1 gt9xx_ts = 0