diff --git a/drivers/input/misc/ets_fps_mmi/Android.mk b/drivers/input/misc/ets_fps_mmi/Android.mk index c1c3d34d25d5..c9746409bc89 100644 --- a/drivers/input/misc/ets_fps_mmi/Android.mk +++ b/drivers/input/misc/ets_fps_mmi/Android.mk @@ -17,8 +17,8 @@ ifeq ($(FPS_NAVI_ENABLE),true) endif endif -ifeq ($(DISPLAY_SPEED_UP), true) - KERNEL_CFLAGS += CONFIG_DISPLAY_SPEED_UP=y +ifeq ($(EGIS_DISPLAY_SPEED_UP), true) + KERNEL_CFLAGS += CONFIG_EGIS_DISPLAY_SPEED_UP=y endif ifeq ($(FPS_ENABLE_DOUBLE_TAP), true) diff --git a/drivers/input/misc/ets_fps_mmi/Kbuild b/drivers/input/misc/ets_fps_mmi/Kbuild index de4753ecd02b..0cda93132709 100644 --- a/drivers/input/misc/ets_fps_mmi/Kbuild +++ b/drivers/input/misc/ets_fps_mmi/Kbuild @@ -35,8 +35,8 @@ ifneq ($(filter rav%, $(TARGET_PRODUCT)),) EXTRA_CFLAGS += -DCONFIG_INPUT_EGISTEC_FPS_POSE=0 endif -ifneq ($(filter m y, $(CONFIG_DISPLAY_SPEED_UP)),) -EXTRA_CFLAGS += -DCONFIG_DISPLAY_SPEED_UP +ifneq ($(filter m y, $(CONFIG_EGIS_DISPLAY_SPEED_UP)),) +EXTRA_CFLAGS += -DCONFIG_EGIS_DISPLAY_SPEED_UP endif ifneq ($(filter m y, $(CONFIG_NAV_DOUBLE_TAP)),) diff --git a/drivers/input/misc/ets_fps_mmi/ets_fps.c b/drivers/input/misc/ets_fps_mmi/ets_fps.c index cf3e185f1222..0ed14fea3d30 100644 --- a/drivers/input/misc/ets_fps_mmi/ets_fps.c +++ b/drivers/input/misc/ets_fps_mmi/ets_fps.c @@ -246,7 +246,7 @@ void interrupt_timer_routine(unsigned long _data) } #endif -#ifdef CONFIG_DISPLAY_SPEED_UP +#ifdef CONFIG_EGIS_DISPLAY_SPEED_UP extern void ext_dsi_display_early_power_on(void); static bool is_auth_ready = false; #endif @@ -262,11 +262,10 @@ static irqreturn_t fp_eint_func(int irq, void *dev_id) #else __pm_wakeup_event(ets_wake_lock, 1500); #endif -#ifdef CONFIG_DISPLAY_SPEED_UP - if (is_auth_ready) { - pr_info("etspi: call ext_dsi_display_early_power_on()"); - ext_dsi_display_early_power_on(); - } else +#ifdef CONFIG_EGIS_DISPLAY_SPEED_UP + if (is_auth_ready) + pr_info("etspi: already in authentication mode"); + else pr_info("etspi: not in authentication mode"); #endif return IRQ_HANDLED; @@ -530,11 +529,19 @@ static long etspi_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) DEBUG_PRINT("etspi:fp_ioctl <<< fp Trigger function abort\n"); fps_interrupt_abort(); goto done; -#ifdef CONFIG_DISPLAY_SPEED_UP - case SET_AUTH_STATUS: - pr_info("etspi: - set auth status: %lu", arg); - if (arg) is_auth_ready = true; - else is_auth_ready = false; +#ifdef CONFIG_EGIS_DISPLAY_SPEED_UP + case NOTIFY_AUTH_STATUS: + pr_info("etspi: - notify auth status: %lu", arg); + if (arg == AUTH_STATUS_NONE) + is_auth_ready = false; + else if (arg == AUTH_STATUS_READY) + is_auth_ready = true; + else if (arg == AUTH_STATUS_FINGER_DETECTED) { + if (is_auth_ready) { + pr_info("etspi: call ext_dsi_display_early_power_on()"); + ext_dsi_display_early_power_on(); + } + } goto done; #endif default: diff --git a/drivers/input/misc/ets_fps_mmi/ets_fps.h b/drivers/input/misc/ets_fps_mmi/ets_fps.h index e0c33b7bcdbd..5b1cd1343104 100644 --- a/drivers/input/misc/ets_fps_mmi/ets_fps.h +++ b/drivers/input/misc/ets_fps_mmi/ets_fps.h @@ -74,8 +74,13 @@ #define INT_TRIGGER_ABORT 0xa8 #define FP_TRANSFER_SYNC 0xAA -#ifdef CONFIG_DISPLAY_SPEED_UP -#define SET_AUTH_STATUS 0xD1 +#ifdef CONFIG_EGIS_DISPLAY_SPEED_UP +#define NOTIFY_AUTH_STATUS 0xD1 + +#define AUTH_STATUS_NONE 0 +#define AUTH_STATUS_READY 1 +#define AUTH_STATUS_FINGER_DETECTED 2 +#define AUTH_STATUS_CAPTURED 3 #endif #define DRDY_IRQ_ENABLE 1