Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52c9eb46 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "arm64: defconfig: Enable new touchscreen for lito device"

parents 8775a08c 2c7f8ef1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -337,6 +337,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_SECURE_TOUCH_SYNAPTICS_DSX=y
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_REFLASH=y
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_RECOVERY=y
CONFIG_TOUCHSCREEN_FTS=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_QPNP_POWER_ON=y
CONFIG_INPUT_UINPUT=y
+1 −0
Original line number Diff line number Diff line
@@ -344,6 +344,7 @@ CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_SECURE_TOUCH_SYNAPTICS_DSX=y
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_REFLASH=y
CONFIG_TOUCHSCREEN_SYNAPTICS_TCM_RECOVERY=y
CONFIG_TOUCHSCREEN_FTS=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_QPNP_POWER_ON=y
CONFIG_INPUT_UINPUT=y
+2 −0
Original line number Diff line number Diff line
@@ -1351,4 +1351,6 @@ config TOUCHSCREEN_SYNAPTICS_TCM

source "drivers/input/touchscreen/synaptics_tcm/Kconfig"

source "drivers/input/touchscreen/focaltech_touch/Kconfig"

endif
+1 −0
Original line number Diff line number Diff line
@@ -112,3 +112,4 @@ obj-$(CONFIG_TOUCHSCREEN_ROHM_BU21023) += rohm_bu21023.o
obj-$(CONFIG_TOUCHSCREEN_ST)		+= st/
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_DSX) += synaptics_dsx/
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_TCM)	+= synaptics_tcm/
obj-$(CONFIG_TOUCHSCREEN_FTS)	+= focaltech_touch/
+30 −11
Original line number Diff line number Diff line
@@ -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