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

Commit b1e998b9 authored by Shantanu Jain's avatar Shantanu Jain
Browse files

input: touchscreen: correct the return value in ITE tech touch driver



Correct the return value of it7260_ts_chip_low_power_mode function
in ITE tech touch driver.

CRs-Fixed: 1020680
Change-Id: Iaaeb4ae22fadefd976906fdf8a995cd7cfe12d33
Signed-off-by: default avatarShantanu Jain <shjain@codeaurora.org>
parent 25af9ff9
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -748,15 +748,27 @@ static int it7260_ts_chip_low_power_mode(struct it7260_ts_data *ts_data,
	u8 dummy;
	int ret;

	if (sleep_type)
	if (sleep_type) {
		ret = it7260_i2c_write_no_ready_check(ts_data, BUF_COMMAND,
					cmd_sleep, sizeof(cmd_sleep));
		if (ret != IT_I2C_WRITE_RET)
			dev_err(&ts_data->client->dev,
				"Can't go to sleep or low power mode(%d) %d\n",
				sleep_type, ret);
		else
			ret = 0;
	} else {
		ret = it7260_i2c_read_no_ready_check(ts_data, BUF_QUERY, &dummy,
						sizeof(dummy));
		if (ret != IT_I2C_READ_RET)
			dev_err(&ts_data->client->dev,
				"Can't go to active mode %d\n", retval);
		else
			ret = 0;
	}

	msleep(WAIT_CHANGE_MODE);
	return (ret == IT_I2C_WRITE_RET ? 0 : ret);
	return ret;
}

static ssize_t sysfs_fw_upgrade_store(struct device *dev,