进行中 #25 » wakeup.patch
kernel/arch/arm64/boot/dts/rockchip/rp-lcd-mipi-10-800-1280-jd9365.dtsi | ||
---|---|---|
gtp_change_x2y = <0>;
|
||
gtp_overturn_x = <0>;
|
||
gtp_overturn_y = <0>;
|
||
gtp_send_cfg = <1>;
|
||
gtp_send_cfg = <1>;
|
||
gtp_touch_wakeup = <1>;
|
||
goodix_rst_gpio = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||
goodix_irq_gpio = <&gpio1 22 IRQ_TYPE_EDGE_RISING>;
|
||
|
kernel/arch/arm64/boot/dts/rockchip/rp-lcd-mipi-800-1280-8inch-jd933-boe.dtsi | ||
---|---|---|
gtp_overturn_x = <0>;
|
||
gtp_overturn_y = <0>;
|
||
gtp_send_cfg = <1>;
|
||
gtp_touch_wakeup = <1>;
|
||
goodix_rst_gpio = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||
goodix_irq_gpio = <&gpio1 22 IRQ_TYPE_EDGE_RISING>;
|
||
kernel/arch/arm64/boot/dts/rockchip/rp_lcd_mipi_1920_1200.dtsi | ||
---|---|---|
gtp_change_x2y = <0>;
|
||
gtp_overturn_x = <0>;
|
||
gtp_overturn_y = <0>;
|
||
gtp_send_cfg = <1>;
|
||
gtp_send_cfg = <1>;
|
||
gtp_touch_wakeup = <1>;
|
||
goodix_rst_gpio = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||
goodix_irq_gpio = <&gpio1 22 IRQ_TYPE_EDGE_RISING>;
|
||
|
kernel/arch/arm64/boot/dts/rockchip/rp_lcd_mipi_720_1280.dtsi | ||
---|---|---|
gtp_change_x2y = <0>;
|
||
gtp_overturn_x = <0>;
|
||
gtp_overturn_y = <0>;
|
||
gtp_send_cfg = <1>;
|
||
gtp_send_cfg = <1>;
|
||
gtp_touch_wakeup = <1>;
|
||
goodix_rst_gpio = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||
goodix_irq_gpio = <&gpio1 22 IRQ_TYPE_EDGE_RISING>;
|
||
|
kernel/arch/arm64/boot/dts/rockchip/rp_lcd_mipi_7_1200_1920-JDIFC070.dtsi | ||
---|---|---|
gtp_change_x2y = <0>;
|
||
gtp_overturn_x = <0>;
|
||
gtp_overturn_y = <0>;
|
||
gtp_send_cfg = <1>;
|
||
gtp_send_cfg = <1>;
|
||
gtp_touch_wakeup = <1>;
|
||
goodix_rst_gpio = <&gpio1 4 GPIO_ACTIVE_LOW>;
|
||
goodix_irq_gpio = <&gpio1 22 IRQ_TYPE_EDGE_RISING>;
|
||
|
kernel/drivers/input/touchscreen/gt9xx/gt9xx.c | ||
---|---|---|
int gtp_overturn_x;
|
||
int gtp_overturn_y;
|
||
int gtp_send_cfgs;
|
||
int gtp_int_tarigger;
|
||
int gtp_int_tarigger;
|
||
int gtp_touch_wakeup;
|
||
};
|
||
struct gtp_config_custom *gtp_config;
|
||
... | ... | |
#endif
|
||
|
||
#endif
|
||
//add by rpdzkj yang for ronpin MIPI_1920x1080_10.1INCH_TP Firmware compatibility 20181031
|
||
int RP_MIPI_1920_1080_10INCH_TP = 0;
|
||
int Im_old = 0;//Old_RP_mipi_1920x1080_10inch_tp
|
||
//end
|
||
static s8 gtp_i2c_test(struct i2c_client *client);
|
||
void gtp_reset_guitar(struct i2c_client *client, s32 ms);
|
||
... | ... | |
}
|
||
long int touch_wakeup_timeVal = 0;
|
||
long int touch_wakeup_time_gt9xx(void)
|
||
{
|
||
struct timespec tm;
|
||
tm = current_kernel_time();
|
||
|
||
return tm.tv_sec;
|
||
}
|
||
/*******************************************************
|
||
Function:
|
||
kernel time difference absolut function
|
||
Input:
|
||
ts:Value
|
||
Output:
|
||
ts:kernel time difference absolut
|
||
*********************************************************/
|
||
long int time_difference_absolute_gt9xx(long int time_val)
|
||
{
|
||
long time_temp = 0;
|
||
time_temp = touch_wakeup_time_gt9xx() - time_val;
|
||
if(time_temp < 0)
|
||
time_temp = time_temp*(-1);
|
||
|
||
return time_temp;
|
||
}
|
||
/*******************************************************
|
||
Function:
|
||
Report touch point event
|
||
... | ... | |
}
|
||
}
|
||
}
|
||
/*
|
||
if (!w)
|
||
{
|
||
click_array[0] = 0;
|
||
if (id == 0)
|
||
{
|
||
click_array[1] = 0;
|
||
click_index = 0;
|
||
printk("up\n");
|
||
}
|
||
}
|
||
*/
|
||
if(gtp_config->gtp_touch_wakeup == 1){
|
||
if( ts->gtp_is_suspend != 0){
|
||
touch_wakeup_timeVal = touch_wakeup_time_gt9xx();//touch lcd wakeup start time;
|
||
}
|
||
|
||
if( (0 == ts->gtp_is_suspend) && ( time_difference_absolute_gt9xx(touch_wakeup_timeVal) > 1 )){
|
||
#if GTP_ICS_SLOT_REPORT
|
||
input_mt_slot(ts->input_dev, id);
|
||
input_report_abs(ts->input_dev, ABS_MT_TRACKING_ID, id);
|
||
input_report_abs(ts->input_dev, ABS_MT_POSITION_X, x);
|
||
input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, y);
|
||
input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, w);
|
||
input_report_abs(ts->input_dev, ABS_MT_WIDTH_MAJOR, w);
|
||
#else
|
||
input_report_key(ts->input_dev, BTN_TOUCH, 1);
|
||
input_report_abs(ts->input_dev, ABS_MT_POSITION_X, x);
|
||
input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, y);
|
||
input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, w);
|
||
input_report_abs(ts->input_dev, ABS_MT_WIDTH_MAJOR, w);
|
||
input_report_abs(ts->input_dev, ABS_MT_TRACKING_ID, id);
|
||
input_mt_sync(ts->input_dev);
|
||
#endif
|
||
touch_wakeup_timeVal = 0;
|
||
}else if(1 == ts->gtp_is_suspend){
|
||
input_event(ts->input_dev, EV_KEY, KEY_POWER, 1);
|
||
input_event(ts->input_dev, EV_KEY, KEY_POWER, 0);
|
||
input_sync(ts->input_dev);
|
||
ts->gtp_is_suspend = 2;
|
||
}else{
|
||
}
|
||
}else{
|
||
#if GTP_ICS_SLOT_REPORT
|
||
input_mt_slot(ts->input_dev, id);
|
||
input_report_abs(ts->input_dev, ABS_MT_TRACKING_ID, id);
|
||
... | ... | |
input_report_abs(ts->input_dev, ABS_MT_TRACKING_ID, id);
|
||
input_mt_sync(ts->input_dev);
|
||
#endif
|
||
}
|
||
GTP_DEBUG("ID:%d, X:%d, Y:%d, W:%d", id, x, y, w);
|
||
// printk("ID:%d, X:%d, Y:%d, W:%d\n", id, x, y, w);
|
||
}
|
||
... | ... | |
of_property_read_u32(np, "gtp_overturn_y", &(gtp_config->gtp_overturn_y));
|
||
of_property_read_u32(np, "gtp_send_cfg", &(gtp_config->gtp_send_cfgs));
|
||
of_property_read_u32(np, "gtp_int_tarigger", &(gtp_config->gtp_int_tarigger));
|
||
of_property_read_u32(np, "gtp_touch_wakeup", &(gtp_config->gtp_touch_wakeup));
|
||
|
||
}
|
||
... | ... | |
s8 ret = -1;
|
||
|
||
GTP_DEBUG_FUNC();
|
||
if(gtp_config->gtp_touch_wakeup == 1){
|
||
ts->gtp_is_suspend = 1;
|
||
}else{
|
||
if (ts->enter_update) {
|
||
return;
|
||
}
|
||
... | ... | |
// delay 48 + 10ms to ensure reliability
|
||
msleep(58);
|
||
}
|
||
}
|
||
/*******************************************************
|
||
Function:
|
kernel/drivers/input/touchscreen/gt9xx/gt9xx.h | ||
---|---|---|
// STEP_4(optional): If keys are available and reported as keys, config your key info here
|
||
#if GTP_HAVE_TOUCH_KEY
|
||
#define GTP_KEY_TAB {KEY_MENU, KEY_HOME, KEY_BACK}
|
||
#define GTP_KEY_TAB {KEY_MENU, KEY_HOME, KEY_BACK, KEY_POWER}
|
||
#endif
|
||
//***************************PART3:OTHER define*********************************
|