Skip to content

Commit 760dbe1

Browse files
jbeptxjic23
authored andcommitted
staging:iio:adc:MXS:LRADC: fix touchscreen statemachine
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 18da755 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> Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent e194fd8 commit 760dbe1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/staging/iio/adc/mxs-lradc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,7 @@ static void mxs_lradc_finish_touch_event(struct mxs_lradc *lradc, bool valid)
757757
}
758758

759759
/* if it is released, wait for the next touch via IRQ */
760+
lradc->cur_plate = LRADC_TOUCH;
760761
mxs_lradc_reg_clear(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ, LRADC_CTRL1);
761762
mxs_lradc_reg_set(lradc, LRADC_CTRL1_TOUCH_DETECT_IRQ_EN, LRADC_CTRL1);
762763
}

0 commit comments

Comments
 (0)