diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index 07c191f362a6..26982411f117 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -376,6 +376,14 @@ config TOUCHSCREEN_EXC3000 To compile this driver as a module, choose M here: the module will be called exc3000. +config TOUCHSCREEN_FTS + tristate "Focaltech Touchscreen" + depends on I2C + default n + help + Say Y here if you have Focaltech touch panel. + If unsure, say N. + config TOUCHSCREEN_FUJITSU tristate "Fujitsu serial touchscreen" select SERIO diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile index d0a31ff27b77..4b3578b4f5fc 100644 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@ -44,6 +44,7 @@ obj-$(CONFIG_TOUCHSCREEN_ELO) += elo.o obj-$(CONFIG_TOUCHSCREEN_EGALAX) += egalax_ts.o obj-$(CONFIG_TOUCHSCREEN_EGALAX_SERIAL) += egalax_ts_serial.o obj-$(CONFIG_TOUCHSCREEN_EXC3000) += exc3000.o +obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_touch/ obj-$(CONFIG_TOUCHSCREEN_FUJITSU) += fujitsu_ts.o obj-$(CONFIG_TOUCHSCREEN_GOODIX) += goodix.o obj-$(CONFIG_TOUCHSCREEN_GSL3673) += gsl3673-ts.o diff --git a/drivers/input/touchscreen/focaltech_touch/Makefile b/drivers/input/touchscreen/focaltech_touch/Makefile index bf7df1543b01..fbf30651f2f8 100644 --- a/drivers/input/touchscreen/focaltech_touch/Makefile +++ b/drivers/input/touchscreen/focaltech_touch/Makefile @@ -5,14 +5,15 @@ # Each configuration option enables a list of files. -obj-y += focaltech_core.o -obj-y += focaltech_ex_fun.o -obj-y += focaltech_ex_mode.o -obj-y += focaltech_flash.o -obj-y += focaltech_gesture.o -obj-y += focaltech_esdcheck.o -obj-y += focaltech_i2c.o -obj-y += focaltech_point_report_check.o -obj-y += focaltech_flash/ -obj-y += focaltech_test/ +obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech-ts.o +focaltech-ts-y += focaltech_core.o +focaltech-ts-y += focaltech_ex_fun.o +focaltech-ts-y += focaltech_ex_mode.o +focaltech-ts-y += focaltech_flash.o +focaltech-ts-y += focaltech_gesture.o +focaltech-ts-y += focaltech_esdcheck.o +focaltech-ts-y += focaltech_i2c.o +focaltech-ts-y += focaltech_point_report_check.o +focaltech-ts-y += focaltech_upgrade_ft8201.o +focaltech-ts-y += focaltech_test/ diff --git a/drivers/input/touchscreen/focaltech_touch/focaltech_flash.c b/drivers/input/touchscreen/focaltech_touch/focaltech_flash.c index 43672a78ddac..1ea7fecc0592 100644 --- a/drivers/input/touchscreen/focaltech_touch/focaltech_flash.c +++ b/drivers/input/touchscreen/focaltech_touch/focaltech_flash.c @@ -35,6 +35,7 @@ #include "focaltech_core.h" #include "focaltech_flash.h" +#define vfs_read(fp, buf, len, pos) kernel_read(fp, buf, len, pos) /***************************************************************************** * Static variables *****************************************************************************/ diff --git a/drivers/input/touchscreen/focaltech_touch/focaltech_flash/Makefile b/drivers/input/touchscreen/focaltech_touch/focaltech_flash/Makefile deleted file mode 100644 index 133dbcf8d701..000000000000 --- a/drivers/input/touchscreen/focaltech_touch/focaltech_flash/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -# Makefile for the focaltech touchscreen drivers. -# - -# Each configuration option enables a list of files. - - -obj-y += focaltech_upgrade_ft8201.o \ No newline at end of file diff --git a/drivers/input/touchscreen/focaltech_touch/focaltech_test/focaltech_test_ini.c b/drivers/input/touchscreen/focaltech_touch/focaltech_test/focaltech_test_ini.c index a6ea11fd6025..41833bfcd7f3 100644 --- a/drivers/input/touchscreen/focaltech_touch/focaltech_test/focaltech_test_ini.c +++ b/drivers/input/touchscreen/focaltech_touch/focaltech_test/focaltech_test_ini.c @@ -128,22 +128,6 @@ static int fts_strncmp(const char *cs, const char *ct, int count) return 0; } -static int isspace(int x) -{ - if (x == ' ' || x == '\t' || x == '\n' || x == '\f' || x == '\b' || x == '\r') - return 1; - else - return 0; -} - -static int isdigit(int x) -{ - if (x <= '9' && x >= '0') - return 1; - else - return 0; -} - static long fts_atol(char *nptr) { int c; /* current char */ diff --git a/drivers/input/touchscreen/focaltech_touch/focaltech_flash/focaltech_upgrade_ft8201.c b/drivers/input/touchscreen/focaltech_touch/focaltech_upgrade_ft8201.c similarity index 99% rename from drivers/input/touchscreen/focaltech_touch/focaltech_flash/focaltech_upgrade_ft8201.c rename to drivers/input/touchscreen/focaltech_touch/focaltech_upgrade_ft8201.c index e32de88b2435..9be40800d42e 100644 --- a/drivers/input/touchscreen/focaltech_touch/focaltech_flash/focaltech_upgrade_ft8201.c +++ b/drivers/input/touchscreen/focaltech_touch/focaltech_upgrade_ft8201.c @@ -32,14 +32,14 @@ /***************************************************************************** * 1.Included header files *****************************************************************************/ -#include "../focaltech_core.h" -#include "../focaltech_flash.h" +#include "focaltech_core.h" +#include "focaltech_flash.h" /***************************************************************************** * Global variable or extern global variabls/functions *****************************************************************************/ u8 pb_file_ft8006m[] = { -#include "../include/pramboot/FT8006M_Pramboot_V1.6_20180426_le.h" +#include "include/pramboot/FT8006M_Pramboot_V1.6_20180426_le.h" }; /*****************************************************************************