Re: [PATCH 2/5] Read whole message instead of just the first byte to make CHG low

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Input: qt602240_ts - Read whole message instead of just the first byte to make CHG low

From: Iiro Valkonen <iiro.valkonen@xxxxxxxxx>

Read the whole message, as reading just the first byte isn't always guaranteed to clear the message.

Signed-off-by: Iiro Valkonen <iiro.valkonen@xxxxxxxxx>
---
 drivers/input/touchscreen/qt602240_ts.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/input/touchscreen/qt602240_ts.c b/drivers/input/touchscreen/qt602240_ts.c
index 739d18a..6ef8290 100644
--- a/drivers/input/touchscreen/qt602240_ts.c
+++ b/drivers/input/touchscreen/qt602240_ts.c
@@ -699,16 +699,16 @@ static int mxt_check_matrix_size(struct mxt_data *data)
 static int mxt_make_highchg(struct mxt_data *data)
 {
 	struct device *dev = &data->client->dev;
+	struct mxt_message message;
 	int count = 10;
 	int error;
-	u8 val;
 
 	/* Read dummy message to make high CHG pin */
 	do {
-		error = mxt_read_object(data, MXT_GEN_MESSAGE, 0, &val);
+		error = mxt_read_message(data, &message);
 		if (error)
 			return error;
-	} while ((val != 0xff) && --count);
+	} while ((message.reportid != 0xff) && --count);
 
 	if (!count) {
 		dev_err(dev, "CHG pin isn't cleared\n");
-- 
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux