mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
Merge "drivers: input: touchscreen: defer probe if panel not found"
This commit is contained in:
commit
9d40a272d9
3 changed files with 18 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue