public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: Martin Kelly <martin@martingkelly.com>
Cc: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: imu: inv_mpu6050: do not flush fifo when iio buffer is full
Date: Sun, 15 Apr 2018 18:07:06 +0100	[thread overview]
Message-ID: <20180415180706.126bcd02@archlinux> (raw)
In-Reply-To: <673bbcd1-f2f8-33ca-9920-db2289d10ce0@martingkelly.com>

On Sat, 14 Apr 2018 11:00:07 -0700
Martin Kelly <martin@martingkelly.com> wrote:

> On 04/13/2018 01:25 AM, Jean-Baptiste Maneyrol wrote:
> > There is no need to flush fifo and loose all data when the iio
> > buffer is full. Just drop the data by ignoring the error as
> > commonly done in other drivers.
> > 
> > Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
> > ---
> >   drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 6 ++----
> >   1 file changed, 2 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
> > index ff81c6a..27c663c 100644
> > --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
> > +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
> > @@ -170,10 +170,8 @@ irqreturn_t inv_mpu6050_read_fifo(int irq, void *p)
> >   		if (result == 0)
> >   			timestamp = 0;
> >   
> > -		result = iio_push_to_buffers_with_timestamp(indio_dev, data,
> > -							    timestamp);
> > -		if (result)
> > -			goto flush_fifo;
> > +		iio_push_to_buffers_with_timestamp(indio_dev, data, timestamp);
> > +
> >   		fifo_count -= bytes_per_datum;
> >   	}
> >   
> >   
> 
> Reviewed-by: Martin Kelly <martin@martingkelly.com>
> 
> I wondered the same thing as I was reading this code :).

Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan

> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


      reply	other threads:[~2018-04-15 17:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-13  8:25 [PATCH] iio: imu: inv_mpu6050: do not flush fifo when iio buffer is full Jean-Baptiste Maneyrol
2018-04-14 18:00 ` Martin Kelly
2018-04-15 17:07   ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180415180706.126bcd02@archlinux \
    --to=jic23@jic23.retrosnub.co.uk \
    --cc=jmaneyrol@invensense.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=martin@martingkelly.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox