This is a note to let you know that I've just added the patch titled

    iio: mxs-lradc: only update the buffer when its conversions have finished

to the 3.14-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     
iio-mxs-lradc-only-update-the-buffer-when-its-conversions-have-finished.patch
and it can be found in the queue-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 89bb35e200bee745c539a96666e0792301ca40f1 Mon Sep 17 00:00:00 2001
From: Kristina Martšenko <[email protected]>
Date: Sun, 25 Jan 2015 18:28:22 +0200
Subject: iio: mxs-lradc: only update the buffer when its conversions have 
finished
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Kristina Martšenko <[email protected]>

commit 89bb35e200bee745c539a96666e0792301ca40f1 upstream.

Using the touchscreen while running buffered capture results in the
buffer reporting lots of wrong values, often just zeros. This is because
we push readings to the buffer every time a touchscreen interrupt
arrives, including when the buffer's own conversions have not yet
finished. So let's only push to the buffer when its conversions are
ready.

Signed-off-by: Kristina Martšenko <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/staging/iio/adc/mxs-lradc.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -1160,9 +1160,12 @@ static irqreturn_t mxs_lradc_handle_irq(
        }
 
        if (iio_buffer_enabled(iio))
-               iio_trigger_poll(iio->trig, iio_get_time_ns());
-       else if (reg & LRADC_CTRL1_LRADC_IRQ(0))
+       if (iio_buffer_enabled(iio)) {
+               if (reg & lradc->buffer_vchans)
+                       iio_trigger_poll(iio->trig, iio_get_time_ns());
+       } else if (reg & LRADC_CTRL1_LRADC_IRQ(0)) {
                complete(&lradc->completion);
+       }
 
        mxs_lradc_reg_clear(lradc, reg & clr_irq, LRADC_CTRL1);
 


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.14/iio-mxs-lradc-separate-touchscreen-and-buffer-virtual-channels.patch
queue-3.14/iio-mxs-lradc-make-adc-reads-not-disable-touchscreen-interrupts.patch
queue-3.14/iio-mxs-lradc-make-adc-reads-not-unschedule-touchscreen-conversions.patch
queue-3.14/iio-mxs-lradc-only-update-the-buffer-when-its-conversions-have-finished.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to