input: touchscreen: add option to ignore Focaltech family-id check
Focaltech touchscreen ICs may use different chip IDs for same module.
Add support to ignore ID check for such cases.
Change-Id: I0fe8da6a5e687317b4878b59ac5d1a4a4b620e1d
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
diff --git a/drivers/input/touchscreen/ft5x06_ts.c b/drivers/input/touchscreen/ft5x06_ts.c
index 2f9ea10..367a987 100644
--- a/drivers/input/touchscreen/ft5x06_ts.c
+++ b/drivers/input/touchscreen/ft5x06_ts.c
@@ -1247,6 +1247,9 @@
pdata->fw_vkey_support = of_property_read_bool(np,
"focaltech,fw-vkey-support");
+ pdata->ignore_id_check = of_property_read_bool(np,
+ "focaltech,ignore-id-check");
+
rc = of_property_read_u32(np, "focaltech,family-id", &temp_val);
if (!rc)
pdata->family_id = temp_val;
@@ -1447,7 +1450,7 @@
dev_info(&client->dev, "Device ID = 0x%x\n", reg_value);
- if (pdata->family_id != reg_value) {
+ if ((pdata->family_id != reg_value) && (!pdata->ignore_id_check)) {
dev_err(&client->dev, "%s:Unsupported controller\n", __func__);
goto free_reset_gpio;
}