diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2013-03-09 18:20:50 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-03-12 11:50:19 -0400 |
commit | fa45255ee72649bd061116f7d3a765f5784bf078 (patch) | |
tree | 8ca2e5caecee1ac127abbd2ec859e4ccdff1a7a8 /drivers/input | |
parent | cfd5d09691ee188a36c00f5c3b220fbf082a78d7 (diff) |
Input: wm9712 - fix return code for wrong sample
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.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/wm9712.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/wm9712.c b/drivers/input/touchscreen/wm9712.c index 6e743e3dfda4..a983da1744e8 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) | |||
298 | dev_dbg(wm->dev, "adc wrong sample, wanted %x got %x", | 298 | dev_dbg(wm->dev, "adc wrong sample, wanted %x got %x", |
299 | adcsel & WM97XX_ADCSEL_MASK, | 299 | adcsel & WM97XX_ADCSEL_MASK, |
300 | *sample & WM97XX_ADCSEL_MASK); | 300 | *sample & WM97XX_ADCSEL_MASK); |
301 | return RC_PENUP; | 301 | return RC_AGAIN; |
302 | } | 302 | } |
303 | 303 | ||
304 | if (wants_pen && !(*sample & WM97XX_PEN_DOWN)) { | 304 | if (wants_pen && !(*sample & WM97XX_PEN_DOWN)) { |