Thread (42 messages) 42 messages, 8 authors, 2014-02-24
DORMANTno replies

[PATCH] staging/iio/adc/MXS/LRADC: fix touchscreen statemachine

From: jic23@kernel.org (Jonathan Cameron)
Date: 2014-02-24 22:04:21
Also in: linux-iio, linux-input

On 24/02/14 21:14, Jonathan Cameron wrote:
On 24/02/14 16:48, Alexandre Belloni wrote:
quoted
On 24/02/2014 at 15:39:53 +0100, Juergen Beisert wrote :
quoted
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.

Signed-off-by: Juergen Beisert <redacted>
Tested-by: Alexandre Belloni <redacted>
Applied to the fixes-togreg branch of iio.git  Thanks
I just forced an update to the tree having realised that I'd not
marked it for stable (the change went into the 3.13 tree) and that
a few more details were needed to explain the effects of the problem
and where it came from. Will let it sit overnight then send on to
Greg sometime in the next few days.  Good to have this one cleared up.

Jonathan
Jonathan
quoted
quoted
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index 7fc66a6..514844e 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -757,6 +757,7 @@ static void mxs_lradc_finish_touch_event(struct mxs_lradc *lradc, bool valid)
      }

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

--
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help