guam: input touch ilitek set deep sleep mode

input touch ilitek set deep sleep mode
chipone enable esd
NO_PROP_NEEDED

Change-Id: Iebfdd06a6b88b2691309e9b23b0de152a88bd3c3
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1745616
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hua Tan <tanhua1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
dengwei1 2020-09-10 10:41:31 +08:00 • committed by Wei Deng
commit 1b1a75d0d4
6 changed files with 19 additions and 8 deletions

View file

@ -6,6 +6,9 @@ CHIPONE_MMI_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib/modules/
else
CHIPONE_MMI_MODULE_PATH := $(KERNEL_MODULES_OUT)
endif
ifeq ($(CHIPONE_ESD),true)
KERNEL_CFLAGS += CONFIG_CHIPONE_ESD=y
endif
include $(CLEAR_VARS)
LOCAL_MODULE := chipone_tddi_mmi.ko

View file

@ -2,6 +2,9 @@
EXTRA_CFLAGS += -Wall
EXTRA_CFLAGS += -I$(TOP)/motorola/kernel/modules/include \
-I$(TOP)/motorola/kernel/modules/drivers/input/touchscreen/chipone_tddi_mmi
ifneq ($(filter m y,$(CONFIG_CHIPONE_ESD)),)
EXTRA_CFLAGS += -DCONFIG_CTS_ESD_PROTECTION
endif
obj-m := chipone_tddi_mmi.o

View file

@ -2169,8 +2169,8 @@ int cts_stop_device(struct cts_device *cts_dev)
int cts_start_device_esdrecover(struct cts_device *cts_dev)
{
#ifdef CONFIG_CTS_ESD_PROTECTION
struct chipone_ts_data *cts_data =
container_of(cts_dev, struct chipone_ts_data, cts_dev);
//struct chipone_ts_data *cts_data =
// container_of(cts_dev, struct chipone_ts_data, cts_dev);
#endif /* CONFIG_CTS_ESD_PROTECTION */
int ret;

View file

@ -234,7 +234,7 @@ int ili_wq_esd_i2c_check(void)
static void ilitek_tddi_wq_esd_check(struct work_struct *work)
{
mutex_lock(&ilits->touch_mutex);
if (ilits->esd_recover() < 0) {
if (!ilits->tp_suspend && ilits->esd_recover() < 0) {
ILI_ERR("SPI ACK failed, doing spi recovery\n");
ili_spi_recovery();
}

View file

@ -443,8 +443,13 @@ static int ilitek_plat_notifier_fb(struct notifier_block *self, unsigned long ev
*/
if (event == DRM_PANEL_EARLY_EVENT_BLANK)
{
if (ili_sleep_handler(TP_SUSPEND) < 0)
ILI_ERR("TP suspend failed\n");
if (ilits->tp_module == MODEL_TM) {
if (ili_sleep_handler(TP_DEEP_SLEEP) < 0)
ILI_ERR("TP deep sleep in failed\n");
} else {
if (ili_sleep_handler(TP_SUSPEND) < 0)
ILI_ERR("TP suspend failed\n");
}
#ifdef ILI_CONFIG_GESTURE
touch_set_state(TOUCH_LOW_POWER_STATE, TOUCH_PANEL_IDX_PRIMARY);
#endif

View file

@ -273,7 +273,7 @@ static int ili_spi_wrapper(u8 *txbuf, u32 wlen, u8 *rxbuf, u32 rlen, bool spi_ir
{
int ret = 0;
int mode = 0, index = 0;
u8 wdata[32] = {0};
u8 wdata[128] = {0};
u8 checksum = 0;
bool ice = atomic_read(&ilits->ice_stat);
@ -286,7 +286,7 @@ static int ili_spi_wrapper(u8 *txbuf, u32 wlen, u8 *rxbuf, u32 rlen, bool spi_ir
/* 3 bytes data consist of length and header */
if ((wlen + 3) > sizeof(wdata)) {
ILI_ERR("WARNING! wlen(%d) > wdata(%d), using wdata length to transfer\n", wlen, (int)sizeof(wdata));
wlen = sizeof(wdata);
wlen = sizeof(wdata) - 3;
}
}
@ -333,9 +333,9 @@ static int ili_spi_wrapper(u8 *txbuf, u32 wlen, u8 *rxbuf, u32 rlen, bool spi_ir
index = 3;
}
wlen += index;
ipio_memcpy(&wdata[index], txbuf, wlen, wlen);
wlen += index;
/*
* NOTE: If TP driver is doing MP test and commanding 0xF1 to FW, we add a checksum