[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170502122452.GF3030@Socrates-UM>
Date: Tue, 2 May 2017 20:24:53 +0800
From: Eva Rachel Retuya <eraretuya@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Jonathan Cameron <jic23@...nel.org>, linux-iio@...r.kernel.org,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald <pmeerw@...erw.net>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Michael Hennerich <michael.hennerich@...log.com>,
Daniel Baluta <daniel.baluta@...il.com>,
Alison Schofield <amsfield22@...il.com>,
Florian Vaussard <florian.vaussard@...g-vd.ch>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 4/4] iio: accel: adxl345: Add support for triggered
buffer
On Mon, May 01, 2017 at 02:24:27PM +0300, Andy Shevchenko wrote:
[...]
> One nit below.
> FWIW:
> Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
>
> > +static irqreturn_t adxl345_trigger_handler(int irq, void *p)
> > +{
> > + struct iio_poll_func *pf = p;
> > + struct iio_dev *indio_dev = pf->indio_dev;
> > + struct adxl345_data *data = iio_priv(indio_dev);
> > + int ret;
> > +
> > + mutex_lock(&data->lock);
> > + /* Make sure data is ready when using external trigger */
> > + if (!data->data_ready_trig_on) {
> > + ret = adxl345_data_ready(data);
> > + if (ret < 0)
> > + goto error;
> > + }
> > +
> > + ret = regmap_bulk_read(data->regmap, ADXL345_REG_DATAX0, data->buffer,
> > + sizeof(__le16) * 3);
> > + if (ret < 0)
> > + goto error;
> > +
> > + iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
> > + pf->timestamp);
>
> > +error:
>
> I would call it 'err_unlock_notify'.
>
OK.
Thanks for the review,
Eva
> > + mutex_unlock(&data->lock);
> > + iio_trigger_notify_done(indio_dev->trig);
> > +
> > + return IRQ_HANDLED;
> > +}
>
> --
> With Best Regards,
> Andy Shevchenko
Powered by blists - more mailing lists