diff --git a/drivers/input/touchscreen/nova_0flash_mmi/Android.mk b/drivers/input/touchscreen/nova_0flash_mmi/Android.mk index 3d065adec355..445bf9f5345d 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/Android.mk +++ b/drivers/input/touchscreen/nova_0flash_mmi/Android.mk @@ -31,6 +31,10 @@ ifeq ($(CONFIG_INPUT_NOVA_ESD_ENABLE),true) KERNEL_CFLAGS += CONFIG_NOVA_ESD_ENABLE=y endif +ifeq ($(CONFIG_INPUT_NOVA_LCM_FAST_LIGHTUP),true) + KERNEL_CFLAGS += CONFIG_NOVA_LCM_FAST_LIGHTUP=y +endif + ifneq ($(BOARD_USES_PEN_NOTIFIER),) KERNEL_CFLAGS += CONFIG_INPUT_NOVA_0FLASH_MMI_PEN_NOTIFIER=y endif diff --git a/drivers/input/touchscreen/nova_0flash_mmi/Kbuild b/drivers/input/touchscreen/nova_0flash_mmi/Kbuild index 4e3c59973a1d..02acd9aa0fbc 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/Kbuild +++ b/drivers/input/touchscreen/nova_0flash_mmi/Kbuild @@ -29,6 +29,10 @@ ifneq ($(filter m y,$(CONFIG_NOVA_ESD_ENABLE)),) EXTRA_CFLAGS += -DNVT_CONFIG_ESD_ENABLE endif +ifneq ($(filter m y,$(CONFIG_NOVA_LCM_FAST_LIGHTUP)),) + EXTRA_CFLAGS += -DLCM_FAST_LIGHTUP +endif + ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_0FLASH_MMI_STYLUS_PALM)),) EXTRA_CFLAGS += -DPALM_GESTURE endif diff --git a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c index c23b45d152a2..390897d73d20 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c +++ b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c @@ -133,6 +133,10 @@ int nvt_mcu_pen_detect_set(uint8_t pen_detect); #if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL)) #if defined(CONFIG_DRM) static int nvt_drm_notifier_callback(struct notifier_block *self, unsigned long event, void *data); +#ifdef LCM_FAST_LIGHTUP +static struct work_struct ts_resume_work; +static void nova_resume_work_func(struct work_struct *work); +#endif //end LCM_FAST_LIGHTUP #endif #else //vension code < 5.4.0 #if defined(CONFIG_FB) @@ -2403,7 +2407,9 @@ static int32_t nvt_ts_probe(struct spi_device *client) // please make sure boot update start after display reset(RESX) sequence queue_delayed_work(nvt_fwu_wq, &ts->nvt_fwu_work, msecs_to_jiffies(14000)); #endif - +#ifdef LCM_FAST_LIGHTUP + INIT_WORK(&ts_resume_work, nova_resume_work_func); +#endif NVT_LOG("NVT_TOUCH_ESD_PROTECT is %d\n", NVT_TOUCH_ESD_PROTECT); #if NVT_TOUCH_ESD_PROTECT INIT_DELAYED_WORK(&nvt_esd_check_work, nvt_esd_check_func); @@ -2979,6 +2985,14 @@ static int32_t nvt_ts_resume(struct device *dev) #if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || defined(NVT_CONFIG_DRM_PANEL)) #if defined(CONFIG_DRM) +#ifdef LCM_FAST_LIGHTUP +static void nova_resume_work_func(struct work_struct *work) +{ + NVT_LOG("%s\n", __func__); + nvt_ts_resume(&ts->client->dev); +} +#endif //end LCM_FAST_LIGHTUP + static int nvt_drm_notifier_callback(struct notifier_block *self, unsigned long event, void *data) { struct msm_drm_notifier *evdata = data; @@ -3014,7 +3028,17 @@ static int nvt_drm_notifier_callback(struct notifier_block *self, unsigned long } else if (event == MSM_DRM_EVENT_BLANK) { if (*blank == MSM_DRM_BLANK_UNBLANK) { NVT_LOG("event=%lu, *blank=%d\n", event, *blank); +#ifdef LCM_FAST_LIGHTUP + if (nvt_fwu_wq) { + queue_work(nvt_fwu_wq, &ts_resume_work); + NVT_LOG("LCM_FAST_LIGHTUP, queue_work\n"); + } else { + NVT_LOG("nvt_fwu_wq null"); + nvt_ts_resume(&ts->client->dev); + } +#else nvt_ts_resume(&ts->client->dev); +#endif //LCM_FAST_LIGHTUP } }