From: Markus Pargmann Date: Sat, 9 Mar 2013 23:20:50 +0000 (-0800) Subject: Input: wm9712 - fix return code for wrong sample X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=fa45255ee72649bd061116f7d3a765f5784bf078;p=openwrt%2Fstaging%2Fblogic.git 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 Acked-by: Mark Brown Signed-off-by: Dmitry Torokhov --- 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) 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)) {