summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHaibo Chen <haibo.chen@nxp.com>2017-08-03 17:02:42 +0800
committerHaibo Chen <haibo.chen@nxp.com>2017-08-04 10:21:37 +0800
commit667a7dd0e629ad244cf8bc7ceab10c90c214e976 (patch)
treeb2e35cd6e827e5e8a81bb17d705d6560b61be8e6 /drivers
parent8caf1f5a3efaf0f76f470c338e7727a558ac01bc (diff)
MLK-15950 input: egalax_ts: switch to i2c interface before wake up
For HannStar (HSD100PXN1 Rev: 1-A00C11 F/W:0634) LVDS touch screen, it has a special request for the EETI touch controller. The host needs to trigger I2C event to device FW at booting first, and then the FW can switch to I2C interface. Otherwise, the FW can’t work with I2C interface, and can't generate any interrupt when touch the screen. This patch send an I2C command before the device wake up, make sure the device switch to I2C interface first. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Andy Duan <fugang.duan@nxp.com> (cherry picked from commit 037f88c1b9566008748d54b9d4feb647c38c6153)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/touchscreen/egalax_ts.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c
index 1afc08b08155..d5f41cbb599e 100644
--- a/drivers/input/touchscreen/egalax_ts.c
+++ b/drivers/input/touchscreen/egalax_ts.c
@@ -186,6 +186,20 @@ static int egalax_ts_probe(struct i2c_client *client,
ts->client = client;
ts->input_dev = input_dev;
+ /* HannStar (HSD100PXN1 Rev: 1-A00C11 F/W:0634) LVDS touch
+ * screen needs to trigger I2C event to device FW at booting
+ * first, and then the FW can switch to I2C interface.
+ * Otherwise, the FW can’t work with I2C interface. So here
+ * just use the exist function egalax_firmware_version() to
+ * send a I2C command to the device, make sure the device FW
+ * switch to I2C interface.
+ */
+ error = egalax_firmware_version(client);
+ if (error) {
+ dev_err(&client->dev, "Failed to switch to I2C interface\n");
+ return error;
+ }
+
/* controller may be in sleep, wake it up. */
error = egalax_wake_up_device(client);
if (error) {