From 2056aae4fabb055a16f82ccbbf055cab0350d24d Mon Sep 17 00:00:00 2001 From: liujian24 Date: Wed, 30 Mar 2022 19:00:11 +0800 Subject: [PATCH] Devon:Bringup Egistec FPS ETS_617 WHY:Bringup Egistec FPS ETS_617 WHAT:Update driver Change-Id: Id7b129aMontana7759a1a4ba33b88a190615005a822a Reviewed-on: https://gerrit.mot.com/2229622 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: liujian Reviewed-by: Wang Wang Submit-Approved: Jira Key --- drivers/input/misc/ets_bix_mmi/etxxx_fp.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/input/misc/ets_bix_mmi/etxxx_fp.c b/drivers/input/misc/ets_bix_mmi/etxxx_fp.c index 2683452ffef1..b3f52acaf474 100755 --- a/drivers/input/misc/ets_bix_mmi/etxxx_fp.c +++ b/drivers/input/misc/ets_bix_mmi/etxxx_fp.c @@ -68,6 +68,9 @@ struct egisfp_dev_t *g_data = NULL; +static int waitq_type = 0; +static int screenonoff_flag = 0; + DECLARE_BITMAP(minors, N_SPI_MINORS); LIST_HEAD(device_list); DEFINE_MUTEX(device_list_lock); @@ -398,6 +401,13 @@ unsigned int egisfp_interrupt_poll(struct file *file, struct poll_table_struct * mask |= 0x400 | POLLRDNORM; egis_dev->fps_ints.drdy_irq_abort = 0; } + else if(screenonoff_flag == 1){ + mask = waitq_type ; + screenonoff_flag = 0; + waitq_type = 0; + INFO_PRINT(" egisfp_screenonoff_poll_mask = %d \n", mask); + } + return mask; } @@ -831,7 +841,7 @@ int egisfp_platformfree(struct egisfp_dev_t *egis_dev) int egisfp_platforminit(struct egisfp_dev_t *egis_dev) { int status; - INFO_PRINT(" %s : Version %s \n", __func__, DRIVER_VERSION); + INFO_PRINT(" %s : Version %s, 0329 \n", __func__, DRIVER_VERSION); if (egis_dev != NULL) { if (!egis_dev->platforminit_done) @@ -1066,7 +1076,10 @@ static int egisfp_fb_callback(struct notifier_block *nb, unsigned long val, void default: break; } - INFO_PRINT(" %s : screen_onoff = %d \n", __func__, egis_dev->screen_onoff); + screenonoff_flag = 1; + waitq_type |= POLLIN | POLLHUP; + wake_up_interruptible(&interrupt_waitq); + INFO_PRINT(" %s : screen_onoff = %d waitq_type =%d \n", __func__, egis_dev->screen_onoff,waitq_type); envp[1] = NULL; ret = kobject_uevent_env(&egis_dev->dd->dev.kobj, KOBJ_CHANGE, envp); return NOTIFY_OK; @@ -1104,7 +1117,10 @@ static int egisfp_fb_callback(struct notifier_block *nb, unsigned long val, void default: break; } - INFO_PRINT(" %s : screen_onoff = %d \n", __func__, egis_dev->screen_onoff); + screenonoff_flag = 1; + waitq_type |= POLLIN | POLLHUP; + wake_up_interruptible(&interrupt_waitq); + INFO_PRINT(" %s : screen_onoff = %d waitq_type =%d \n", __func__, egis_dev->screen_onoff,waitq_type); envp[1] = NULL; ret = kobject_uevent_env(&egis_dev->dd->dev.kobj, KOBJ_CHANGE, envp); return NOTIFY_OK;