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

Commit f5c1a1c3 authored by Satya Rama Aditya Pinapala's avatar Satya Rama Aditya Pinapala Committed by Gerrit - the friendly Code Review server
Browse files

drivers: input: touchscreen: defer probe if panel not found



In many cases display panel information may not be available when the touch
driver is being probed. This change defers the probe if the panel is not
found to ensure that the correct touch driver is probed.

Change-Id: I12d1dd3678a85baa468b332d61be4ba9ce81db43
Signed-off-by: default avatarSatya Rama Aditya Pinapala <psraditya30@codeaurora.org>
parent f7f07211
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3428,7 +3428,7 @@ static int mxt_check_dt(struct device_node *np)
			return 0;
	}

	return -ENODEV;
	return PTR_ERR(panel);
}
#endif

@@ -3528,7 +3528,11 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id)

#ifdef CONFIG_OF
#ifdef CONFIG_DRM
	if (mxt_check_dt(dt)) {
	error = mxt_check_dt(dt);
	if (error == -EPROBE_DEFER)
		return error;

	if (error) {
		if (!(mxt_check_dedicated_touch(dt, "compatible",
			"qcom,i2c-touch-active")))
			return -EPROBE_DEFER;
+6 −2
Original line number Diff line number Diff line
@@ -1704,7 +1704,7 @@ static int fts_ts_check_dt(struct device_node *np)
		}
	}

	return -ENODEV;
	return PTR_ERR(panel);
}

static int fts_ts_check_default_tp(struct device_node *dt, const char *prop)
@@ -1764,7 +1764,11 @@ static int fts_ts_probe(struct i2c_client *client, const struct i2c_device_id *i
		return -ENODEV;
	}

	if (fts_ts_check_dt(dp)) {
	ret = fts_ts_check_dt(dp);
	if (ret == -EPROBE_DEFER)
		return ret;

	if (ret) {
		if (!fts_ts_check_default_tp(dp, "qcom,i2c-touch-active"))
			ret = -EPROBE_DEFER;
		else
+6 −2
Original line number Diff line number Diff line
@@ -4512,7 +4512,7 @@ static int check_dt(struct device_node *np)
		}
	}

	return -ENODEV;
	return PTR_ERR(panel);
}

static int check_default_tp(struct device_node *dt, const char *prop)
@@ -4939,7 +4939,11 @@ static int fts_probe(struct i2c_client *client, const struct i2c_device_id *idp)
	int error = 0;
	struct device_node *dp = client->dev.of_node;

	if (check_dt(dp)) {
	error = check_dt(dp);
	if (error == -EPROBE_DEFER)
		return error;

	if (error) {
		if (!check_default_tp(dp, "qcom,i2c-touch-active"))
			error = -EPROBE_DEFER;
		else