Thread (6 messages) 6 messages, 2 authors, 2013-03-09
STALE4855d REVIEWED: 1 (0M)
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 2/4] Input: wm9712: Fix returncode for wrong sample

From: Markus Pargmann <hidden>
Date: 2013-03-09 17:05:51
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest, wolfson microelectronics drivers · Maintainers: Dmitry Torokhov, Linus Torvalds

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 <redacted>
Cc: Christian Hemp <redacted>
Cc: stable@vger.kernel.org
Signed-off-by: Markus Pargmann <redacted>
Acked-by: Mark Brown <redacted>
---
 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.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help