Hi All :) that still keep silence!
I would like to mention the following :
In linux-sunxi there is
http://dl.linux-sunxi.org/SDK/A80/A80_SDK_20140728_stripped/lichee/linux-3.4/drivers/input/touchscreen/icn83xx/it is strange that the author is from Chipone, as minimum should be someone who adopt this code for sunxi.
Actually in my tablet (Chuwi vi10 11 rev) there is Chipone ICN8528.h that is probably the same as 83xx.
Looks like INT/WAKE gpio pin is between 390-394, Taking into account my experience with Chuwi vi8 with GSL1680, - lets assume that it is the same in Vi10 - and that is gpio393.
QUESTIONS are:
1) How to initialize the chip? What is the sequence? It looks it is not enough just set gpio to 1.
From the code I see this but do not understand logic - please explain it more detailed!
int ctp_wakeup(int status,int ms)
{
dprintk(DEBUG_INIT,"***CTP*** %s:status:%d,ms = %d\n",__func__,status,ms);
if (status == 0) {
if(ms == 0) {
__gpio_set_value(config_info.wakeup_gpio.gpio, 0);
}else {
__gpio_set_value(config_info.wakeup_gpio.gpio, 0);
msleep(ms);
__gpio_set_value(config_info.wakeup_gpio.gpio, 1);
}
}
if (status == 1) {
if(ms == 0) {
__gpio_set_value(config_info.wakeup_gpio.gpio, 1);
}else {
__gpio_set_value(config_info.wakeup_gpio.gpio, 1);
msleep(ms);
__gpio_set_value(config_info.wakeup_gpio.gpio, 0);
}
}
msleep(5);
return 0;
2) Please describe in a few words the feature of linux-sunxi - what is ctp_config_info and how input information goes to it.
for example in the mentioned above link there is such lines in icn83xx.c
#define CTP_IRQ_NUMBER (config_info.int_number) - WHERE THIS VALUE IS LOCATED OR HOW IT IS TAKEN - it is not determined in the .h or .c.
#define CTP_IRQ_MODE (IRQF_TRIGGER_FALLING)
#define SCREEN_MAX_X (screen_max_x)
#define SCREEN_MAX_Y (screen_max_y)
#define PRESS_MAX (255)
static int screen_max_x = 0;
static int screen_max_y = 0;
static int revert_x_flag = 0;
static int revert_y_flag = 0;
static int exchange_x_y_flag = 0;
static u32 int_handle = 0;
static __u32 twi_id = 0;
struct ctp_config_info config_info = {
.input_type = CTP_TYPE,
.name = NULL,
};