mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
input: touchscreen: synaptics_tcm: 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: I52b8cd49342b6213639eefb8f10876178612af49 Signed-off-by: Ritesh Kumar <[email protected]>
This commit is contained in:
parent
55d1e41a78
commit
94c76c0d74
1 changed files with 6 additions and 2 deletions
|
|
@ -371,7 +371,7 @@ static int syna_tcm_check_dt(struct device_node *np)
|
|||
}
|
||||
}
|
||||
|
||||
return -ENODEV;
|
||||
return PTR_ERR(panel);
|
||||
}
|
||||
|
||||
static int syna_tcm_check_default_tp(struct device_node *dt, const char *prop)
|
||||
|
|
@ -409,7 +409,11 @@ static int syna_tcm_i2c_probe(struct i2c_client *i2c,
|
|||
int retval;
|
||||
struct device_node *dt = i2c->dev.of_node;
|
||||
|
||||
if (syna_tcm_check_dt(dt)) {
|
||||
retval = syna_tcm_check_dt(dt);
|
||||
if (retval == -EPROBE_DEFER)
|
||||
return retval;
|
||||
|
||||
if (retval) {
|
||||
if (!syna_tcm_check_default_tp(dt, "qcom,i2c-touch-active"))
|
||||
retval = -EPROBE_DEFER;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue