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

Commit 11c338c7 authored by Shantanu Jain's avatar Shantanu Jain Committed by Gerrit - the friendly Code Review server
Browse files

input: it7258_ts_i2c: Do not put driver in infinite loop



Do not put the ITE tech touchscreen driver in infinite
loop while probing.
Sometimes, when there is multiple touchscreen support on the
same snapdragon device, then the dynamic detection is used
to confirm which touchscreen is connected to the device.
So, this change will not make the CPUs to get hogged with
infinite loop of ITE tech driver.
Now it can easily get out of probe with error path releasing
the resources properly.

Change-Id: Ib9905017fc18999e7ab7c9cb8bc1af398f5f9791
Signed-off-by: default avatarShantanu Jain <shjain@codeaurora.org>
parent ec9fd7cc
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@
#define FW_WRITE_CHUNK_SIZE		128
#define FW_WRITE_RETRY_COUNT		4
#define CHIP_FLASH_SIZE			0x8000
#define DEVICE_READY_MAX_WAIT		500
#define DEVICE_READY_MAX_WAIT		10

/* result of reading with BUF_QUERY bits */
#define CMD_STATUS_BITS			0x07
@@ -1111,7 +1111,7 @@ static bool IT7260_chipIdentify(void)
							'2', '6', '0'};
	uint8_t chip_id[10] = {0,};

	IT7260_waitDeviceReady(true, false);
	IT7260_waitDeviceReady(false, false);

	if (!IT7260_i2cWriteNoReadyCheck(BUF_COMMAND, cmd_ident,
							sizeof(cmd_ident))) {
@@ -1119,7 +1119,7 @@ static bool IT7260_chipIdentify(void)
		return false;
	}

	IT7260_waitDeviceReady(true, false);
	IT7260_waitDeviceReady(false, false);

	if (!IT7260_i2cReadNoReadyCheck(BUF_RESPONSE, chip_id,
							sizeof(chip_id))) {