Cypfq: dlkm: Add power off process for ili9882a
- Since now we having display/touch current drain issue when suspend, so need to set rst pin to low when suspend and add reset process to change rst pin to high when resume. - For compatibility with other projects, add macro ILITEK_SUSPEND_PWROFF to control this function. Change-Id: Iab7d65adf820ccfdb4c3e50d7a5bdff624097694 Signed-off-by: wengjun1 <wengjun1@motorola.com> Reviewed-on: https://gerrit.mot.com/2035322 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
fb61470904
commit
f3e69e7065
3 changed files with 22 additions and 0 deletions
|
@ -21,6 +21,10 @@ ifeq ($(ILITEK_FW_PANEL),true)
|
|||
KERNEL_CFLAGS += CONFIG_ILITEK_FW_PANEL=y
|
||||
endif
|
||||
|
||||
ifeq ($(ILITEK_SUSPEND_PWROFF),true)
|
||||
KERNEL_CFLAGS += CONFIG_ILITEK_SUSPEND_PWROFF=y
|
||||
endif
|
||||
|
||||
ifeq ($(ILITEK_CHARGER),true)
|
||||
KERNEL_CFLAGS += CONFIG_ILITEK_CHARGER=y
|
||||
endif
|
||||
|
|
|
@ -26,6 +26,9 @@ endif
|
|||
ifneq ($(filter m y,$(CONFIG_ILITEK_FW_PANEL)),)
|
||||
EXTRA_CFLAGS += -DILI_FW_PANEL
|
||||
endif
|
||||
ifneq ($(filter m y,$(CONFIG_ILITEK_SUSPEND_PWROFF)),)
|
||||
EXTRA_CFLAGS += -DILI_SUSPEND_PWROFF
|
||||
endif
|
||||
ifneq ($(filter m y,$(CONFIG_ILITEK_CHARGER)),)
|
||||
EXTRA_CFLAGS += -DILI_CONFIG_CHARGER
|
||||
endif
|
||||
|
|
|
@ -51,6 +51,10 @@ static void ilitek_resume_by_ddi_work(struct work_struct *work)
|
|||
disable_irq_wake(ilits->irq_num);
|
||||
#endif
|
||||
|
||||
#ifdef ILI_SUSPEND_PWROFF
|
||||
ili_pinctrl_select_normal(ilits);
|
||||
#endif
|
||||
|
||||
/* Set tp as demo mode and reload code if it's iram. */
|
||||
ilits->actual_tp_mode = P5_X_FW_AP_MODE;
|
||||
if (ilits->fw_upgrade_mode == UPGRADE_IRAM)
|
||||
|
@ -58,7 +62,9 @@ static void ilitek_resume_by_ddi_work(struct work_struct *work)
|
|||
else
|
||||
ili_reset_ctrl(ilits->reset);
|
||||
|
||||
#ifndef ILI_SUSPEND_PWROFF
|
||||
ili_pinctrl_select_normal(ilits);
|
||||
#endif
|
||||
|
||||
ili_irq_enable();
|
||||
ILI_INFO("TP resume end by wq\n");
|
||||
|
@ -542,8 +548,17 @@ int ili_sleep_handler(int mode)
|
|||
#endif
|
||||
{
|
||||
ili_pinctrl_select_suspend(ilits);
|
||||
|
||||
#ifdef ILI_SUSPEND_PWROFF
|
||||
gpio_direction_output(ilits->tp_rst, 1);
|
||||
mdelay(1);
|
||||
gpio_set_value(ilits->tp_rst, 0);
|
||||
mdelay(5);
|
||||
#else
|
||||
if (ili_ic_func_ctrl("sleep", DEEP_SLEEP_IN) < 0)
|
||||
ILI_ERR("Write deep sleep in cmd failed\n");
|
||||
#endif
|
||||
|
||||
}
|
||||
ILI_INFO("TP deep suspend end\n");
|
||||
ilits->tp_suspend = true;
|
||||
|
|
Loading…
Reference in a new issue