config CT36X_TS
tristate "CT36X touchscreens support"
-choice
- prompt "ct36x chip select"
- depends on CT36X_TS
- default CT365_TS
-
- config CT365_TS
- bool "ct365"
- config CT363_TS
- bool "ct363"
- config CT361_TS
- bool "ct360"
-endchoice
config TOUCHSCREEN_88PM860X
tristate "Marvell 88PM860x touchscreen"
#define CT36X_CHIP_FLASH_SECTOR_SIZE 128
#define CT36X_CHIP_FLASH_SOURCE_SIZE 8
-static unsigned char binary_data[] = {
-#ifdef CONFIG_CT365_TS
+static unsigned char ct365_binary_data[] = {
#include "RK_DPT101_CT365_01_V02_099E_140107.dat"
-#else
+};
+
+static unsigned char ct363_binary_data[] = {
#include "wgj97112tsm01_CT363_01_V01_EA50_140224.dat"
-#endif
};
+
int ct36x_chip_set_idle(struct ct36x_data *ts)
{
int ret = 0;
buf[2] = (char)(flash_addr >> 8);
buf[3] = (char)(flash_addr & 0xFF);
buf[4] = 0x08;
-
+ unsigned char *binary_data;
+
+ if(flag_ct36x_model ==365)
+ binary_data = ct365_binary_data;
+ else if(flag_ct36x_model ==363)
+ binary_data = ct363_binary_data;
+
// Fill firmware source data
if ( flash_addr == (160) || flash_addr == (168) ) {
buf[6] = ~binary_data[flash_addr + 0];
//#else
//#define ct36x_dbg(ts, format, arg...)
//#endif
+int flag_ct36x_model;
+
int ct36x_dbg_level = 0;
module_param_named(dbg_level, ct36x_dbg_level, int, 0644);
#if 1
switch(model){
case 360: ts->ops = &ct360_ops; break;
case 363: ts->ops = &ct363_ops; break;
+ case 365: ts->ops = &ct363_ops; break;
default: return -EINVAL;
};
return -EINVAL;
}
ts->model = val;//pdata->model;
+ flag_ct36x_model = ts->model;
//ts->x_max = pdata->x_max;
//ts->y_max = pdata->y_max;
//ts->rst_io = pdata->rst_io;