staging:iio:adc:MXS:LRADC: fix touchscreen statemachine
authorJuergen Beisert <jbe@pengutronix.de>
Mon, 24 Feb 2014 14:39:00 +0000 (14:39 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 06:06:26 +0000 (22:06 -0800)
commitea6de21a0b82a8db5adc19967bbb89cb7b3a2244
treeec42bd825cfc61290b3b860707c834879ca3a8ba
parentb6e55e9c2599ed049524ba60aeb3b4f8bf986009
staging:iio:adc:MXS:LRADC: fix touchscreen statemachine

commit 760dbe1dcb6d3dd3ead73dc69b23f206b52273bb upstream.

Releasing the touchscreen lets the internal statemachine left in a wrong state.
Due to this the release coordinate will be reported again by accident when the next
touchscreen event happens. This change sets up the correct state when waiting
for the next touchscreen event.

This has led to reported issues with calibrating the touchscreen.
Bug was introduced somewhere in the series that began with
18da755de59b406ce2371a55fb15ed676eb08ed2
Staging/iio/adc/touchscreen/MXS: add proper clock handling
in which the way this driver worked was substantially changed
to be interrupt driven rather than relying on a busy loop.
This was a regression in the 3.13 kernel.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/adc/mxs-lradc.c