drivers/TP: 2ed nt36528 support high resolution 4x.

Fogo 5G NA 2ed Touch.
support high resolution 4x.

Change-Id: Ibabda1a17e7633d3ea0c903db2e3fae78b2e0681
Signed-off-by: lixuehan <hq126@motorola.com>
Reviewed-on: https://gerrit.mot.com/2720623
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
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:
lixuehan 2023-08-23 10:03:40 +08:00 • committed by hq126
commit 15a001bf2b
3 changed files with 25 additions and 0 deletions

View file

@ -21,6 +21,10 @@ ifeq ($(TOUCHSCREEN_LAST_TIME),true)
KBUILD_OPTIONS += CONFIG_NOVA_TOUCH_LAST_TIME=y
endif
ifeq ($(CONFIG_INPUT_HIGH_RESOLUTION_4),true)
KERNEL_CFLAGS += CONFIG_INPUT_HIGH_RESOLUTION_4=y
endif
ifneq ($(MOTO_PANEL_CHECK_TOUCH_STATE),)
KBUILD_OPTIONS += CONFIG_INPUT_NOVA_0FLASH_MMI_NOTIFY_TOUCH_STATE=y
endif

View file

@ -18,6 +18,10 @@ ifneq ($(filter m y,$(CONFIG_NOVA_TOUCH_LAST_TIME)),)
EXTRA_CFLAGS += -DNVT_TOUCH_LAST_TIME
endif
ifneq ($(filter m y, $(CONFIG_INPUT_HIGH_RESOLUTION_4)),)
EXTRA_CFLAGS += -DCONFIG_INPUT_HIGH_RESOLUTION_4
endif
ifneq ($(filter m y,$(CONFIG_INPUT_NOVA_PANEL_NOTIFICATIONS)),)
EXTRA_CFLAGS += -DNVT_CONFIG_PANEL_NOTIFICATIONS
endif

View file

@ -1771,6 +1771,8 @@ static int32_t nvt_ts_point_data_checksum(uint8_t *buf, uint8_t length)
#define POINT_DATA_LEN 120
#define MINOR_DATA_OFFSET 70
#define ORIENT_DATA_OFFSET 110
#elif defined CONFIG_INPUT_HIGH_RESOLUTION_4
#define POINT_DATA_LEN 108
#else
#define POINT_DATA_LEN 65
#endif
@ -1907,6 +1909,20 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
/* update interrupt timer */
irq_timer = jiffies;
#endif /* #if NVT_TOUCH_ESD_PROTECT */
#ifdef CONFIG_INPUT_HIGH_RESOLUTION_4
input_x = (uint32_t)(point_data[position + 1] << 8) + (uint32_t) (point_data[position + 2]);
input_y = (uint32_t)(point_data[position + 3] << 8) + (uint32_t) (point_data[position + 4]);
if ((input_x < 0) || (input_y < 0))
continue;
if ((input_x > ts->abs_x_max) || (input_y > ts->abs_y_max))
continue;
input_major = (uint32_t)(point_data[position + 5]);
if (input_major == 0)
input_major = 1;
input_p = (uint32_t)(point_data[1 + 98 + i]);
if(input_p == 0)
input_p = 1;
#else
input_x = (uint32_t)(point_data[position + 1] << 4) + (uint32_t) (point_data[position + 3] >> 4);
input_y = (uint32_t)(point_data[position + 2] << 4) + (uint32_t) (point_data[position + 3] & 0x0F);
if ((input_x < 0) || (input_y < 0))
@ -1953,6 +1969,7 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
}
if (input_p == 0)
input_p = 1;
#endif /* CONFIG_INPUT_HIGH_RESOLUTION_4 */
#if MT_PROTOCOL_B
press_id[input_id - 1] = 1;