input: ili9882_mmi: remove unused netlink codes

ili9882_mmi:
Removed unused netlink codes, fix vts test fail.

Change-Id: I2b4734252a8dff2bf783201f96acf3d24c75c03a
Signed-off-by: wangyq13 <[email protected]>
Reviewed-on: https://gerrit.mot.com/2438674
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: <[email protected]>
Reviewed-by: Huosheng Liao <[email protected]>
Submit-Approved: Jira Key
This commit is contained in:
wangyq13 2022-11-24 11:25:27 +08:00 • committed by Yeqing Wang
commit a57d3b2149
4 changed files with 17 additions and 0 deletions

View file

@ -942,7 +942,9 @@ struct ilitek_ts_data {
bool wq_bat_ctrl;
bool panel_gesture_enable;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
bool netlink;
#endif
bool report;
bool gesture;
bool mp_retry;

View file

@ -1683,9 +1683,11 @@ static ssize_t ilitek_node_ioctl_write(struct file *filp, const char *buff, size
} else if (strncmp(cmd, "gestureinfo", strlen(cmd)) == 0) {
ilits->gesture_mode = DATA_FORMAT_GESTURE_INFO;
ILI_INFO("gesture mode = %d\n", ilits->gesture_mode);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
} else if (strncmp(cmd, "netlink", strlen(cmd)) == 0) {
ilits->netlink = !ilits->netlink;
ILI_INFO("netlink flag= %d\n", ilits->netlink);
#endif
} else if (strncmp(cmd, "switchtestmode", strlen(cmd)) == 0) {
ili_switch_tp_mode(P5_X_FW_TEST_MODE);
} else if (strncmp(cmd, "switchdebugmode", strlen(cmd)) == 0) {
@ -2193,6 +2195,7 @@ static long ilitek_node_ioctl(struct file *filp, unsigned int cmd, unsigned long
ret = -ENOTTY;
}
break;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
case ILITEK_IOCTL_TP_NETLINK_CTRL:
if (copy_from_user(szBuf, (u8 *) arg, 1)) {
ILI_ERR("Failed to copy data from user space\n");
@ -2215,6 +2218,7 @@ static long ilitek_node_ioctl(struct file *filp, unsigned int cmd, unsigned long
ret = -ENOTTY;
}
break;
#endif
case ILITEK_IOCTL_TP_MODE_CTRL:
if (copy_from_user(szBuf, (u8 *) arg, 10)) {
ILI_ERR("Failed to copy data from user space\n");
@ -2622,6 +2626,7 @@ proc_node iliproc[] = {
};
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
#define NETLINK_USER 21
static struct sock *netlink_skb;
static struct nlmsghdr *netlink_head;
@ -2706,6 +2711,7 @@ static int netlink_init(void)
}
return ret;
}
#endif
#ifndef CONFIG_INPUT_TOUCHSCREEN_MMI
static ssize_t path_show(struct device *pDevice, struct device_attribute *pAttr, char *pBuf)
@ -2825,7 +2831,9 @@ void ili_node_init(void)
ILI_INFO("Succeed to create %s under /proc\n", iliproc[i].name);
}
}
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
netlink_init();
#endif
#ifndef CONFIG_INPUT_TOUCHSCREEN_MMI
ilitek_sys_init();
#endif

View file

@ -735,7 +735,9 @@ static int ilitek_spi_probe(struct spi_device *spi)
ilits->gesture_demo_ctrl = DISABLE;
ilits->wtd_ctrl = OFF;
ilits->report = ENABLE;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
ilits->netlink = DISABLE;
#endif
ilits->dnp = DISABLE;
ilits->irq_tirgger_type = IRQF_TRIGGER_FALLING;
ilits->info_from_hex = ENABLE;

View file

@ -832,6 +832,7 @@ static void ilitek_tddi_touch_send_debug_data(u8 *buf, int len)
mutex_lock(&ilits->debug_mutex);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0))
if (!ilits->netlink && !ilits->dnp)
goto out;
@ -840,6 +841,10 @@ static void ilitek_tddi_touch_send_debug_data(u8 *buf, int len)
ili_netlink_reply_msg(buf, len);
goto out;
}
#else
if (!ilits->dnp)
goto out;
#endif
/* Sending data to apk via the node of debug_message node */
if (ilits->dnp) {