mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
input: ilitek_0flash_mmi: resume touch by ddi
- Trigger touch firmware download by display driver for quick touch response. - Only use panel notify, avoid trigger drm and panel notification at the same time. NO_PROP_NEEDED: New IC driver. Change-Id: I01313efff3713d45362af18c277aa759e67dda23 Signed-off-by: wangyq13 <wangyq13@lenovo.com> Reviewed-on: https://gerrit.mot.com/1649595 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jun Weng <wengjun1@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
db416079e5
commit
377a72515d
5 changed files with 28 additions and 7 deletions
|
|
@ -9,6 +9,10 @@ ifneq ($(BOARD_USES_PANEL_NOTIFICATIONS),)
|
|||
KERNEL_CFLAGS += CONFIG_INPUT_ILI_PANEL_NOTIFICATIONS=y
|
||||
endif
|
||||
|
||||
ifneq ($(DL_FW_BY_DISPLAY),)
|
||||
KERNEL_CFLAGS += CONFIG_ILITEK_RESUME_BY_DDI=y
|
||||
endif
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := ilitek_0flash_mmi.ko
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ endif
|
|||
ifneq ($(filter m y,$(CONFIG_INPUT_ILI_PANEL_NOTIFICATIONS)),)
|
||||
EXTRA_CFLAGS += -DILI_CONFIG_PANEL_NOTIFICATIONS
|
||||
endif
|
||||
ifneq ($(filter m y,$(CONFIG_ILITEK_RESUME_BY_DDI)),)
|
||||
EXTRA_CFLAGS += -DILI_CONFIG_RESUME_BY_DDI
|
||||
endif
|
||||
|
||||
ilitek_0flash_mmi-objs += ilitek.o
|
||||
ilitek_0flash_mmi-objs += ilitek_spi.o
|
||||
|
|
|
|||
|
|
@ -142,7 +142,11 @@
|
|||
#endif
|
||||
#define REGULATOR_POWER DISABLE
|
||||
#define TP_SUSPEND_PRIO ENABLE
|
||||
#ifdef ILI_CONFIG_RESUME_BY_DDI
|
||||
#define RESUME_BY_DDI ENABLE
|
||||
#else
|
||||
#define RESUME_BY_DDI DISABLE
|
||||
#endif
|
||||
#define BOOT_FW_UPDATE ENABLE
|
||||
#define MP_INT_LEVEL DISABLE
|
||||
#define Pll_Clk_Wakeup_TP_Resume ENABLE
|
||||
|
|
|
|||
|
|
@ -480,6 +480,7 @@ int ili_check_default_tp(struct device_node *dt, const char *prop)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifndef ILI_CONFIG_PANEL_NOTIFICATIONS
|
||||
static int drm_notifier_callback(struct notifier_block *self,
|
||||
unsigned long event, void *data)
|
||||
{
|
||||
|
|
@ -526,6 +527,7 @@ static int drm_notifier_callback(struct notifier_block *self,
|
|||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#if defined(CONFIG_DRM_MSM)
|
||||
static int drm_notifier_callback(struct notifier_block *self,
|
||||
unsigned long event, void *data)
|
||||
|
|
@ -704,7 +706,13 @@ static int ili_panel_notifier_callback(struct notifier_block *self, unsigned lon
|
|||
ILI_INFO("event=%lu\n", event);
|
||||
if (ili_sleep_handler(TP_RESUME) < 0)
|
||||
ILI_ERR("TP resume failed\n");
|
||||
break;
|
||||
break;
|
||||
case PANEL_EVENT_DISPLAY_ON_PREPARE:
|
||||
ILI_INFO("event=%lu\n", event);
|
||||
#if RESUME_BY_DDI
|
||||
ili_resume_by_ddi();
|
||||
#endif
|
||||
break;
|
||||
default: /* use DEV_TS here to avoid unused variable */
|
||||
ILI_INFO("%s: function not implemented event %lu\n", __func__, event);
|
||||
break;
|
||||
|
|
@ -728,6 +736,13 @@ static void ilitek_plat_sleep_init(void)
|
|||
ILI_ERR("Unable to register notifier_fb\n");
|
||||
#endif /* CONFIG_PLAT_SPRD */
|
||||
#endif
|
||||
#ifdef ILI_CONFIG_PANEL_NOTIFICATIONS
|
||||
ilits->panel_notif.notifier_call = ili_panel_notifier_callback;
|
||||
ret = register_panel_notifier(&ilits->panel_notif);
|
||||
if(ret) {
|
||||
ILI_ERR("register panel_notifier failed. ret=%d\n", ret);
|
||||
}
|
||||
#else
|
||||
#if defined(CONFIG_DRM)
|
||||
ilits->notifier_fb.notifier_call = drm_notifier_callback;
|
||||
#if defined(CONFIG_DRM_PANEL)
|
||||
|
|
@ -744,12 +759,6 @@ static void ilitek_plat_sleep_init(void)
|
|||
}
|
||||
#endif
|
||||
#endif/* CONFIG_DRM */
|
||||
#ifdef ILI_CONFIG_PANEL_NOTIFICATIONS
|
||||
ilits->panel_notif.notifier_call = ili_panel_notifier_callback;
|
||||
ret = register_panel_notifier(&ilits->panel_notif);
|
||||
if(ret) {
|
||||
ILI_ERR("register panel_notifier failed. ret=%d\n", ret);
|
||||
}
|
||||
#endif
|
||||
#if defined(CONFIG_HAS_EARLYSUSPEND)
|
||||
ILI_ERR("Init eqarly_suspend struct\n");
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ enum panel_event {
|
|||
PANEL_EVENT_PRE_DISPLAY_ON,
|
||||
PANEL_EVENT_DISPLAY_OFF,
|
||||
PANEL_EVENT_DISPLAY_ON,
|
||||
PANEL_EVENT_DISPLAY_ON_PREPARE,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PANEL_NOTIFICATIONS
|
||||
|
|
|
|||
Loading…
Reference in a new issue