Loading drivers/input/touchscreen/Kconfig +2 −0 Original line number Diff line number Diff line Loading @@ -1312,4 +1312,6 @@ config TOUCHSCREEN_IQS5XX source "drivers/input/touchscreen/st/Kconfig" source "drivers/input/touchscreen/focaltech_touch/Kconfig" endif drivers/input/touchscreen/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -111,3 +111,4 @@ obj-$(CONFIG_TOUCHSCREEN_ROHM_BU21023) += rohm_bu21023.o obj-$(CONFIG_TOUCHSCREEN_RASPBERRYPI_FW) += raspberrypi-ts.o obj-$(CONFIG_TOUCHSCREEN_IQS5XX) += iqs5xx.o obj-$(CONFIG_TOUCHSCREEN_ST) += st/ obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_touch/ drivers/input/touchscreen/focaltech_touch/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ # config TOUCHSCREEN_FTS bool "Focaltech Touchscreen" tristate "Focaltech Touchscreen" help Say Y here if you have Focaltech touch panel. If unsure, say N. Loading drivers/input/touchscreen/focaltech_touch/Makefile +5 −10 Original line number Diff line number Diff line # Makefile for the focaltech touchscreen drivers. obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_fts.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_core.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_ex_fun.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_ex_mode.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_gesture.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_esdcheck.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_point_report_check.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_i2c.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_flash.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_flash/ focaltech_fts-y := focaltech_core.o focaltech_ex_fun.o focaltech_ex_mode.o \ focaltech_gesture.o focaltech_esdcheck.o focaltech_point_report_check.o\ focaltech_i2c.o focaltech_flash.o \ focaltech_flash/focaltech_upgrade_ft3518.o drivers/input/touchscreen/focaltech_touch/focaltech_core.c +30 −11 Original line number Diff line number Diff line Loading @@ -1709,28 +1709,47 @@ static int fts_ts_check_dt(struct device_node *np) static int fts_ts_check_default_tp(struct device_node *dt, const char *prop) { const char *active_tp[3 + 1] = {NULL, NULL, NULL, NULL}; int count; int ret; const char **active_tp = NULL; int count, tmp, score = 0; const char *active; int ret, i; count = of_property_count_strings(dt->parent, prop); if (count <= 0 || count > 3) return -ENODEV; active_tp = kcalloc(count, sizeof(char *), GFP_KERNEL); if (!active_tp) { FTS_ERROR("FTS alloc failed\n"); return -ENOMEM; } ret = of_property_read_string_array(dt->parent, prop, (const char **)&active_tp, count); active_tp, count); if (ret < 0) { pr_err(" %s:fail to read %s %d\n", __func__, prop, ret); return -ENODEV; FTS_ERROR("fail to read %s %d\n", prop, ret); ret = -ENODEV; goto out; } if (!of_device_compatible_match(dt, active_tp)) { pr_err(" %s:no match compatible: %s, %s %s\n", __func__, active_tp[0]); return -ENODEV; for (i = 0; i < count; i++) { active = active_tp[i]; if (active != NULL) { tmp = of_device_is_compatible(dt, active); if (tmp > 0) score++; } } return 0; if (score <= 0) { FTS_INFO("not match this driver\n"); ret = -ENODEV; goto out; } ret = 0; out: kfree(active_tp); return ret; } static int fts_ts_probe(struct i2c_client *client, const struct i2c_device_id *id) Loading Loading
drivers/input/touchscreen/Kconfig +2 −0 Original line number Diff line number Diff line Loading @@ -1312,4 +1312,6 @@ config TOUCHSCREEN_IQS5XX source "drivers/input/touchscreen/st/Kconfig" source "drivers/input/touchscreen/focaltech_touch/Kconfig" endif
drivers/input/touchscreen/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -111,3 +111,4 @@ obj-$(CONFIG_TOUCHSCREEN_ROHM_BU21023) += rohm_bu21023.o obj-$(CONFIG_TOUCHSCREEN_RASPBERRYPI_FW) += raspberrypi-ts.o obj-$(CONFIG_TOUCHSCREEN_IQS5XX) += iqs5xx.o obj-$(CONFIG_TOUCHSCREEN_ST) += st/ obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_touch/
drivers/input/touchscreen/focaltech_touch/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ # config TOUCHSCREEN_FTS bool "Focaltech Touchscreen" tristate "Focaltech Touchscreen" help Say Y here if you have Focaltech touch panel. If unsure, say N. Loading
drivers/input/touchscreen/focaltech_touch/Makefile +5 −10 Original line number Diff line number Diff line # Makefile for the focaltech touchscreen drivers. obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_fts.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_core.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_ex_fun.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_ex_mode.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_gesture.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_esdcheck.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_point_report_check.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_i2c.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_flash.o obj-$(CONFIG_TOUCHSCREEN_FTS) += focaltech_flash/ focaltech_fts-y := focaltech_core.o focaltech_ex_fun.o focaltech_ex_mode.o \ focaltech_gesture.o focaltech_esdcheck.o focaltech_point_report_check.o\ focaltech_i2c.o focaltech_flash.o \ focaltech_flash/focaltech_upgrade_ft3518.o
drivers/input/touchscreen/focaltech_touch/focaltech_core.c +30 −11 Original line number Diff line number Diff line Loading @@ -1709,28 +1709,47 @@ static int fts_ts_check_dt(struct device_node *np) static int fts_ts_check_default_tp(struct device_node *dt, const char *prop) { const char *active_tp[3 + 1] = {NULL, NULL, NULL, NULL}; int count; int ret; const char **active_tp = NULL; int count, tmp, score = 0; const char *active; int ret, i; count = of_property_count_strings(dt->parent, prop); if (count <= 0 || count > 3) return -ENODEV; active_tp = kcalloc(count, sizeof(char *), GFP_KERNEL); if (!active_tp) { FTS_ERROR("FTS alloc failed\n"); return -ENOMEM; } ret = of_property_read_string_array(dt->parent, prop, (const char **)&active_tp, count); active_tp, count); if (ret < 0) { pr_err(" %s:fail to read %s %d\n", __func__, prop, ret); return -ENODEV; FTS_ERROR("fail to read %s %d\n", prop, ret); ret = -ENODEV; goto out; } if (!of_device_compatible_match(dt, active_tp)) { pr_err(" %s:no match compatible: %s, %s %s\n", __func__, active_tp[0]); return -ENODEV; for (i = 0; i < count; i++) { active = active_tp[i]; if (active != NULL) { tmp = of_device_is_compatible(dt, active); if (tmp > 0) score++; } } return 0; if (score <= 0) { FTS_INFO("not match this driver\n"); ret = -ENODEV; goto out; } ret = 0; out: kfree(active_tp); return ret; } static int fts_ts_probe(struct i2c_client *client, const struct i2c_device_id *id) Loading