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

Commit d6e831bd authored by Bingzhe Cai's avatar Bingzhe Cai Committed by Gerrit - the friendly Code Review server
Browse files

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.

This patch is propagated from msm-3.10 kernel
(commit: e2a0394e698afda9ab4ec1f25202cf2cf8d13b43
input: touchscreen: add option to ignore Focaltech family-id check)

Also fix the checkpatch errors on 3.18 Kernel.

Change-Id: I0fe8da6a5e687317b4878b59ac5d1a4a4b620e1d
Signed-off-by: default avatarBingzhe Cai <bingzhec@codeaurora.org>
Signed-off-by: default avatarSudhakar Manapati <smanap@codeaurora.org>
parent 75184ddc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ Optional properties:
 - focaltech,fw-delay-era-flsh-ms : specify the erase flash delay in ms for firmware upgrade
 - focaltech,fw-auto-cal	: specify whether calibration is needed after firmware upgrade
 - focaltech,fw-vkey-support	: specify if virtual keys are supported through firmware
 - focaltech,ignore-id-check : specify ignore family-id check

Example:
	i2c@f9923000{
+4 −1
Original line number Diff line number Diff line
@@ -1248,6 +1248,9 @@ static int ft5x06_parse_dt(struct device *dev,
	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;
@@ -1442,7 +1445,7 @@ static int ft5x06_ts_probe(struct i2c_client *client,

	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;
	}
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ struct ft5x06_ts_platform_data {
	bool fw_vkey_support;
	bool no_force_update;
	bool i2c_pull_up;
	bool ignore_id_check;
	int (*power_init)(bool);
	int (*power_on)(bool);
};