提交 fa45255e 编写于 作者: M Markus Pargmann 提交者: Dmitry Torokhov

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: NMarkus Pargmann <mpa@pengutronix.de>
Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 cfd5d096
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册