From patchwork Thu Feb 3 14:02:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iiro Valkonen X-Patchwork-Id: 529351 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p13E17Cm007630 for ; Thu, 3 Feb 2011 14:02:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932142Ab1BCOCG (ORCPT ); Thu, 3 Feb 2011 09:02:06 -0500 Received: from newsmtp5.atmel.com ([204.2.163.5]:27812 "EHLO sjogate2.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756421Ab1BCOCG (ORCPT ); Thu, 3 Feb 2011 09:02:06 -0500 Received: from csomb01.corp.atmel.com ([10.95.30.150]) by sjogate2.atmel.com (8.13.6/8.13.6) with ESMTP id p13DxOFN027852; Thu, 3 Feb 2011 05:59:25 -0800 (PST) Received: from hammb01.corp.atmel.com ([10.142.130.20]) by csomb01.corp.atmel.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Feb 2011 07:02:02 -0700 Received: from [10.191.100.77] ([10.191.100.77]) by hammb01.corp.atmel.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 3 Feb 2011 14:02:01 +0000 Message-ID: <4D4AB56B.40405@atmel.com> Date: Thu, 03 Feb 2011 16:02:19 +0200 From: Iiro Valkonen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Dmitry Torokhov CC: Trilok Soni , linux-input@vger.kernel.org Subject: Re: [PATCH 2/5] Read whole message instead of just the first byte to make CHG low References: <4D3DAE3C.6060806@atmel.com> <20110124170756.GB31066@core.coreip.homeip.net> <4D3EA7DD.6000601@atmel.com> <20110203074318.GA5814@core.coreip.homeip.net> In-Reply-To: <20110203074318.GA5814@core.coreip.homeip.net> X-OriginalArrivalTime: 03 Feb 2011 14:02:01.0382 (UTC) FILETIME=[EDED9C60:01CBC3AA] Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 03 Feb 2011 14:02:07 +0000 (UTC) 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");