From e4a35b32a65580479b3f8a492b005b643df7787b Mon Sep 17 00:00:00 2001 From: Xiaojun Lv Date: Thu, 28 Dec 2023 13:55:36 +0800 Subject: [PATCH] input/focal: initialize input id to support fod event focal: Initialize input id, otherwise the fod event will be ignored by framework. Change-Id: I17d0285dd67699fd5e3ab95190bd288289a02e43 Reviewed-on: https://gerrit.mot.com/2838511 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wei Deng Reviewed-by: Yeqing Wang Reviewed-by: Hujun Liao Submit-Approved: Jira Key --- drivers/input/touchscreen/focaltech_touch_v3/Android.mk | 4 ++++ drivers/input/touchscreen/focaltech_touch_v3/Kconfig | 8 ++++++++ .../input/touchscreen/focaltech_touch_v3/focaltech_core.c | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/drivers/input/touchscreen/focaltech_touch_v3/Android.mk b/drivers/input/touchscreen/focaltech_touch_v3/Android.mk index 89ab92680a79..b7fc04c18662 100644 --- a/drivers/input/touchscreen/focaltech_touch_v3/Android.mk +++ b/drivers/input/touchscreen/focaltech_touch_v3/Android.mk @@ -52,6 +52,10 @@ ifeq ($(TOUCHSCREEN_LAST_TIME),true) KBUILD_OPTIONS += CONFIG_FTS_LAST_TIME=y endif +ifeq ($(FTS_INPUT_ID),true) + KBUILD_OPTIONS += CONFIG_FTS_INPUT_ID=y +endif + else ifneq ($(FOCALTECH_TOUCH_IC_NAME),) KERNEL_CFLAGS += CONFIG_INPUT_FOCALTECH_V3_MMI_IC_NAME=$(FOCALTECH_TOUCH_IC_NAME) diff --git a/drivers/input/touchscreen/focaltech_touch_v3/Kconfig b/drivers/input/touchscreen/focaltech_touch_v3/Kconfig index 4b3d4c1a4af8..f4ce612f5d84 100644 --- a/drivers/input/touchscreen/focaltech_touch_v3/Kconfig +++ b/drivers/input/touchscreen/focaltech_touch_v3/Kconfig @@ -72,3 +72,11 @@ config FTS_LAST_TIME help Say Y here to enable last time functionality on Focaltech V3 touch panel. If unsure, say N. + +config FTS_INPUT_ID + bool "Enable input ID" + depends on TOUCHSCREEN_FTS_V3 + default n + help + Say Y here to enable input ID functionality on Focaltech V3 touch panel. + If unsure, say N. diff --git a/drivers/input/touchscreen/focaltech_touch_v3/focaltech_core.c b/drivers/input/touchscreen/focaltech_touch_v3/focaltech_core.c index 027dd3bb2899..71b108e6dff6 100644 --- a/drivers/input/touchscreen/focaltech_touch_v3/focaltech_core.c +++ b/drivers/input/touchscreen/focaltech_touch_v3/focaltech_core.c @@ -1220,6 +1220,12 @@ static int fts_input_init(struct fts_ts_data *ts_data) input_dev->id.bustype = BUS_SPI; input_dev->dev.parent = ts_data->dev; +#ifdef CONFIG_FTS_INPUT_ID + input_dev->id.product = 0xDEAD; + input_dev->id.vendor = 0xBEEF; + input_dev->id.version = 10427; +#endif + input_set_drvdata(input_dev, ts_data); __set_bit(EV_SYN, input_dev->evbit);