From patchwork Thu Sep 16 10:51:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 185252 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 o8GAmL3Y019026 for ; Thu, 16 Sep 2010 10:48:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754317Ab0IPKsA (ORCPT ); Thu, 16 Sep 2010 06:48:00 -0400 Received: from mail.windriver.com ([147.11.1.11]:38248 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754257Ab0IPKr6 (ORCPT ); Thu, 16 Sep 2010 06:47:58 -0400 Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id o8GAlup5022615; Thu, 16 Sep 2010 03:47:56 -0700 (PDT) Received: from localhost.localdomain ([128.224.163.220]) by ALA-MAIL03.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 16 Sep 2010 03:47:55 -0700 From: Jason Wang To: dmitry.torokhov@gmail.com, notasas@gmail.com, vapier@gentoo.org Cc: linux-input@vger.kernel.org Subject: [PATCH 3/4] Input: ads7846 - restore ADC to powerdown mode if no messgaes needed Date: Thu, 16 Sep 2010 18:51:25 +0800 Message-Id: <1284634286-8871-4-git-send-email-jason77.wang@gmail.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1284634286-8871-3-git-send-email-jason77.wang@gmail.com> References: <1284634286-8871-1-git-send-email-jason77.wang@gmail.com> <1284634286-8871-2-git-send-email-jason77.wang@gmail.com> <1284634286-8871-3-git-send-email-jason77.wang@gmail.com> X-OriginalArrivalTime: 16 Sep 2010 10:47:55.0960 (UTC) FILETIME=[9EE23B80:01CB558C] 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.3 (demeter1.kernel.org [140.211.167.41]); Thu, 16 Sep 2010 10:48:22 +0000 (UTC) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 5ddaeea..eab8b0b 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -729,7 +729,8 @@ static void ads7846_read_state(struct ads7846 *ts) case ADS7846_FILTER_IGNORE: packet->tc.ignore = true; - return; + msg_idx = ts->msg_count - 1; + continue; case ADS7846_FILTER_OK: ads7846_update_value(m, val); @@ -740,6 +741,8 @@ static void ads7846_read_state(struct ads7846 *ts) default: BUG(); } + } else { + msg_idx++; } } }