From e58b8f0d41626718c791aa45566636638453f171 Mon Sep 17 00:00:00 2001 From: Weixin Zhou Date: Tue, 16 Jan 2018 16:07:44 +0800 Subject: [PATCH] input: touchscreen: add gt1x driver Change-Id: Ic4c5abf51c3dd5383bdc91029afbc7c903c2093a Signed-off-by: Weixin Zhou --- drivers/input/touchscreen/Kconfig | 3 +++ drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/gt1x/gt1x_extents.c | 1 + drivers/input/touchscreen/gt1x/gt1x_tools.c | 11 +++++------ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index cc18f54ea887..a5af5702f011 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -404,6 +404,9 @@ config TOUCHSCREEN_GOODIX To compile this driver as a module, choose M here: the module will be called goodix. +config TOUCHSCREEN_GT1X + tristate "GT1X touchscreens support" + config TOUCHSCREEN_HIDEEP tristate "HiDeep Touch IC" depends on I2C diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile index 6233541e9173..5a24503769eb 100644 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@ -45,6 +45,7 @@ obj-$(CONFIG_TOUCHSCREEN_EGALAX_SERIAL) += egalax_ts_serial.o obj-$(CONFIG_TOUCHSCREEN_EXC3000) += exc3000.o obj-$(CONFIG_TOUCHSCREEN_FUJITSU) += fujitsu_ts.o obj-$(CONFIG_TOUCHSCREEN_GOODIX) += goodix.o +obj-$(CONFIG_TOUCHSCREEN_GT1X) += gt1x/ obj-$(CONFIG_TOUCHSCREEN_HIDEEP) += hideep.o obj-$(CONFIG_TOUCHSCREEN_ILI210X) += ili210x.o obj-$(CONFIG_TOUCHSCREEN_IMX6UL_TSC) += imx6ul_tsc.o diff --git a/drivers/input/touchscreen/gt1x/gt1x_extents.c b/drivers/input/touchscreen/gt1x/gt1x_extents.c index 3701d3e8dfc5..ed087d8f0031 100644 --- a/drivers/input/touchscreen/gt1x/gt1x_extents.c +++ b/drivers/input/touchscreen/gt1x/gt1x_extents.c @@ -17,6 +17,7 @@ * Release Date: 2015/07/10 */ +#include #include #include #include diff --git a/drivers/input/touchscreen/gt1x/gt1x_tools.c b/drivers/input/touchscreen/gt1x/gt1x_tools.c index bf442dca73be..1d824bdafd8a 100644 --- a/drivers/input/touchscreen/gt1x/gt1x_tools.c +++ b/drivers/input/touchscreen/gt1x/gt1x_tools.c @@ -60,12 +60,11 @@ s8 IC_TYPE[16] = "GT1X"; static char procname[20] = { 0 }; static struct proc_dir_entry *gt1x_tool_proc_entry; -static struct file_operations gt1x_tool_fops = { - .read = gt1x_tool_read, - .write = gt1x_tool_write, - .open = gt1x_tool_open, - .release = gt1x_tool_release, - .owner = THIS_MODULE, +static const struct proc_ops gt1x_tool_fops = { + .proc_read = gt1x_tool_read, + .proc_write = gt1x_tool_write, + .proc_open = gt1x_tool_open, + .proc_release = gt1x_tool_release, }; static void set_tool_node_name(char *procname)