From patchwork Fri Mar 8 16:15:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Pargmann X-Patchwork-Id: 2239161 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 31A53DF215 for ; Fri, 8 Mar 2013 16:17:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934353Ab3CHQRu (ORCPT ); Fri, 8 Mar 2013 11:17:50 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:55066 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934260Ab3CHQRt (ORCPT ); Fri, 8 Mar 2013 11:17:49 -0500 Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UDzz5-0004Z7-QW; Fri, 08 Mar 2013 17:17:27 +0100 Received: from mpa by dude.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1UDzz5-00057Q-FI; Fri, 08 Mar 2013 17:17:27 +0100 From: Markus Pargmann To: Liam Girdwood Cc: Mark Brown , Dmitry Torokhov , patches@opensource.wolfsonmicro.com, linux-input@vger.kernel.org, kernel@pengutronix.de, Markus Pargmann , =?UTF-8?q?Teresa=20G=C3=A1mez?= , Christian Hemp , stable@vger.kernel.org Subject: [PATCH 2/4] Input: wm9712: Fix returncode for wrong sample Date: Fri, 8 Mar 2013 17:15:07 +0100 Message-Id: <1362759309-18782-3-git-send-email-mpa@pengutronix.de> X-Mailer: git-send-email 1.8.2.rc2 In-Reply-To: <1362759309-18782-1-git-send-email-mpa@pengutronix.de> References: <1362759309-18782-1-git-send-email-mpa@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: mpa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-input@vger.kernel.org Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Instead of interpreting a wrong measurement as pen up, we should try to read again. Based on wm9712: pen up by Teresa Gámez and Christian Hemp. Cc: Teresa Gámez Cc: Christian Hemp Cc: stable@vger.kernel.org Signed-off-by: Markus Pargmann Acked-by: Mark Brown --- drivers/input/touchscreen/wm9712.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/wm9712.c b/drivers/input/touchscreen/wm9712.c index 6e743e3..a983da1 100644 --- a/drivers/input/touchscreen/wm9712.c +++ b/drivers/input/touchscreen/wm9712.c @@ -298,7 +298,7 @@ static int wm9712_poll_sample(struct wm97xx *wm, int adcsel, int *sample) dev_dbg(wm->dev, "adc wrong sample, wanted %x got %x", adcsel & WM97XX_ADCSEL_MASK, *sample & WM97XX_ADCSEL_MASK); - return RC_PENUP; + return RC_AGAIN; } if (wants_pen && !(*sample & WM97XX_PEN_DOWN)) {