Input: wm97xx-core - add retries to wm97xx_read_aux_adc
authorEric Millbrandt <emillbrandt@dekaresearch.com>
Fri, 3 Sep 2010 17:31:05 +0000 (10:31 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 5 Sep 2010 19:14:36 +0000 (12:14 -0700)
commiteb54ddd4d78e62647b7096e4ada7389dbdf2cea7
treecef6a031b465523fac6e0f5c1b1466e1aa986b02
parentd3622e6f05b2134deb5ba8ca2f6bcce5391e7e6d
Input: wm97xx-core - add retries to wm97xx_read_aux_adc

Add logic to wm97xx_read_aux_adc() to retry reading the adc if the
sample failed.  This could occur if the previous sample was still in
the return register or the sample timed-out.  Also avoid a pathologic
failure mode by disabling the digitizer and returning -EBUSY after 5
retries.

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/wm97xx-core.c