日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

全志 添加TP休眠触摸唤醒 Patch

發布時間:2024/10/14 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 全志 添加TP休眠触摸唤醒 Patch 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
add TP觸摸屏喚醒diff --git a/android/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/android/frameworks/base/packa index 9829100..d8fece9 100755 --- a/android/frameworks/base/packages/SettingsProvider/res/values/defaults.xml +++ b/android/frameworks/base/packages/SettingsProvider/res/values/defaults.xml @@ -18,7 +18,7 @@--><resources><bool name="def_dim_screen">true</bool> - <integer name="def_screen_off_timeout">-1</integer> + <integer name="def_screen_off_timeout">180000</integer><integer name="def_sleep_timeout">-1</integer><bool name="def_airplane_mode_on">false</bool><bool name="def_theater_mode_on">false</bool> diff --git a/lichee/linux-3.10/drivers/input/touchscreen/gt9xx_new/gt9xx.c b/lichee/linux-3.10/drivers/input/touchscre index babdd7e..96ce48b 100755 --- a/lichee/linux-3.10/drivers/input/touchscreen/gt9xx_new/gt9xx.c +++ b/lichee/linux-3.10/drivers/input/touchscreen/gt9xx_new/gt9xx.c @@ -463,6 +463,7 @@ static void gtp_touch_down(struct goodix_ts_data* ts,s32 id,s32 x,s32 y,s32 w)}+extern int get_sleep_state(void);/*******************************************************Function:Touch up report function. @@ -484,6 +485,12 @@ static void gtp_touch_up(struct goodix_ts_data* ts, s32 id)input_report_abs(ts->input_dev, ABS_MT_WIDTH_MAJOR, 0);input_mt_sync(ts->input_dev);#endif +#if GTP_WAKEUP_SLEEP_ENABLE == 1 + if(get_sleep_state()) { + input_report_key(ts->input_dev, KEY_POWER, 1); + input_report_key(ts->input_dev, KEY_POWER, 0); + } +#endif}/******************************************************* @@ -998,7 +1005,9 @@ static s8 gtp_request_input_dev(struct goodix_ts_data *ts)input_set_capability(ts->input_dev,EV_KEY,touch_key_array[index]); }#endif - +#if GTP_WAKEUP_SLEEP_ENABLE == 1 + input_set_capability(ts->input_dev,EV_KEY,KEY_POWER); +#endif //#if GTP_CHANGE_X2Y// GTP_SWAP(ts->abs_x_max, ts->abs_y_max);//#endif @@ -1214,7 +1223,7 @@ static void goodix_ts_early_suspend(struct early_suspend *h)struct goodix_ts_data *ts;s8 ret = -1; ts = container_of(h, struct goodix_ts_data, early_suspend); - + printk(" goodix_ts_early_suspend\n");#if GTP_ESD_PROTECTts->gtp_is_suspend = 1;cancel_delayed_work_sync(&gtp_esd_check_work); @@ -1248,7 +1257,7 @@ static void goodix_ts_late_resume(struct early_suspend *h){struct goodix_ts_data *ts;ts = container_of(h, struct goodix_ts_data, early_suspend); - + printk(" goodix_ts_late_resume\n");queue_work(goodix_resume_wq, &goodix_resume_work);//gandy#if GTP_ESD_PROTECT diff --git a/lichee/linux-3.10/drivers/input/touchscreen/gt9xx_new/gt9xx_ts.h b/lichee/linux-3.10/drivers/input/touchs index a766d62..fccb141 100755 --- a/lichee/linux-3.10/drivers/input/touchscreen/gt9xx_new/gt9xx_ts.h +++ b/lichee/linux-3.10/drivers/input/touchscreen/gt9xx_new/gt9xx_ts.h @@ -106,7 +106,7 @@ extern struct ctp_config_info config_info;#define GTP_DEBUG_ON 0#define GTP_DEBUG_ARRAY_ON 0#define GTP_DEBUG_FUNC_ON 0 - +#define GTP_WAKEUP_SLEEP_ENABLE 1//***************************PART2:TODO define**********************************//STEP_1(REQUIRED):Change config table./*TODO: puts the config info corresponded to your TP here, the following is just diff --git a/lichee/linux-3.10/drivers/video/sunxi/disp2/disp/dev_disp.c b/lichee/linux-3.10/drivers/video/sunxi/disp2 index 2c6fc65..b7a95bb 100755 --- a/lichee/linux-3.10/drivers/video/sunxi/disp2/disp/dev_disp.c +++ b/lichee/linux-3.10/drivers/video/sunxi/disp2/disp/dev_disp.c @@ -36,6 +36,14 @@ static struct device *display_dev;static unsigned int g_disp = 0, g_enhance_mode = 0, g_cvbs_enhance_mode = 0;static u32 DISP_print = 0xffff; //print cmd which eq DISP_printstatic bool g_pm_runtime_enable = 0; //when open the CONFIG_PM_RUNTIME,this bool can also control if use the PM_RUNTI + +static int g_sleep_flag_for_tp = 0; + +int get_sleep_state(void) +{ + return g_sleep_flag_for_tp; +} +EXPORT_SYMBOL(get_sleep_state);#ifndef CONFIG_OFstatic struct sunxi_disp_mod disp_mod[] = {{DISP_MOD_DE , "de" }, @@ -1437,7 +1445,7 @@ static int disp_runtime_suspend(struct device *dev)struct list_head* disp_list= NULL;pr_info("%s\n", __func__); - + if (!g_pm_runtime_enable)return 0;@@ -1481,7 +1489,7 @@ static int disp_runtime_resume(struct device *dev)struct list_head* disp_list= NULL;pr_info("%s\n", __func__); - + g_sleep_flag_for_tp = 0;if (!g_pm_runtime_enable)return 0;@@ -1531,7 +1539,7 @@ static int disp_runtime_resume(struct device *dev)static int disp_runtime_idle(struct device *dev){pr_info("%s\n", __func__); - + g_sleep_flag_for_tp = 1;if (g_disp_drv.dev) {pm_runtime_mark_last_busy(g_disp_drv.dev);pm_request_autosuspend(g_disp_drv.dev);

總結

以上是生活随笔為你收集整理的全志 添加TP休眠触摸唤醒 Patch的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。