From: Markus Pargmann <mpa@pengutronix.de>
To: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: "Mark Brown" <broonie@opensource.wolfsonmicro.com>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
patches@opensource.wolfsonmicro.com, linux-input@vger.kernel.org,
kernel@pengutronix.de, "Markus Pargmann" <mpa@pengutronix.de>,
"Teresa Gámez" <t.gamez@phytec.de>,
"Christian Hemp" <c.hemp@phytec.de>,
stable@vger.kernel.org
Subject: [PATCH 2/4] Input: wm9712: Fix returncode for wrong sample
Date: Fri, 8 Mar 2013 17:15:07 +0100 [thread overview]
Message-ID: <1362759309-18782-3-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1362759309-18782-1-git-send-email-mpa@pengutronix.de>
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 <t.gamez@phytec.de>
Cc: Christian Hemp <c.hemp@phytec.de>
Cc: stable@vger.kernel.org
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
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)) {
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-03-08 16:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 16:15 [PATCH 0/4] Input: wm97xx: Fix handling of wrong readings Markus Pargmann
2013-03-08 16:15 ` [PATCH 1/4] Input: wm97xx: Drop out of range inputs Markus Pargmann
2013-03-08 17:15 ` Mark Brown
2013-03-08 18:11 ` Markus Pargmann
2013-03-08 16:15 ` Markus Pargmann [this message]
2013-03-08 17:17 ` [PATCH 2/4] Input: wm9712: Fix returncode for wrong sample Mark Brown
2013-03-08 16:15 ` [PATCH 3/4] Input: wm9712: Fix wrong pen up readings Markus Pargmann
2013-03-08 17:23 ` Mark Brown
2013-03-08 16:15 ` [PATCH 4/4] Input: wm9712: Fix dev_dbg newlines Markus Pargmann
2013-03-08 17:21 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362759309-18782-3-git-send-email-mpa@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=c.hemp@phytec.de \
--cc=dmitry.torokhov@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-input@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=patches@opensource.wolfsonmicro.com \
--cc=stable@vger.kernel.org \
--cc=t.gamez@phytec.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).