From: Eva Rachel Retuya <eraretuya@gmail.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jonathan Cameron <jic23@kernel.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Michael Hennerich <michael.hennerich@analog.com>,
Daniel Baluta <daniel.baluta@gmail.com>,
Alison Schofield <amsfield22@gmail.com>,
Florian Vaussard <florian.vaussard@heig-vd.ch>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCH 4/4] iio: accel: adxl345: Add support for triggered buffer
Date: Tue, 21 Mar 2017 17:56:57 +0800 [thread overview]
Message-ID: <20170321095655.GA5213@Socrates-UM> (raw)
In-Reply-To: <f03e9577-41f9-8f1f-1963-3e8cbac5f979@metafoo.de>
On Mon, Mar 20, 2017 at 08:46:11PM +0100, Lars-Peter Clausen wrote:
> On 03/15/2017 10:50 PM, Jonathan Cameron wrote:
> > On 13/03/17 12:16, Andy Shevchenko wrote:
> >> On Mon, Mar 13, 2017 at 1:11 PM, Eva Rachel Retuya <eraretuya@gmail.com> wrote:
> >>> Provide an all-axes read for triggered buffering.
> >>
> >> Better description is needed.
> >>
> >>> -static int adxl345_get_triple(struct adxl345_data *data, void *buf)
> >>> +static int adxl345_get_triple(struct adxl345_data *data)
> >>
> >> Ping-ponging again. This should be essentially a change in the patch
> >> where you introduce a helper.
> >>
> >>> +err_buffer_cleanup:
> >>> + iio_triggered_buffer_cleanup(indio_dev);
> >>> err_trigger_unregister:
> >>> if (data->drdy_trig)
> >>> iio_trigger_unregister(data->drdy_trig);
> >>
> >> devm_iio_*() ?
> >>
> >>> @@ -334,6 +435,7 @@ int adxl345_core_remove(struct device *dev)
> >>> struct adxl345_data *data = iio_priv(indio_dev);
> >>>
> >>> iio_device_unregister(indio_dev);
> >>> + iio_triggered_buffer_cleanup(indio_dev);
> >>> if (data->drdy_trig)
> >>> iio_trigger_unregister(data->drdy_trig);
> >>
> >> Ditto.
> >>
> >>> diff --git a/drivers/iio/accel/adxl345_i2c.c b/drivers/iio/accel/adxl345_i2c.c
> >>> index 8c791b8..1e0f071 100644
> >>> --- a/drivers/iio/accel/adxl345_i2c.c
> >>> +++ b/drivers/iio/accel/adxl345_i2c.c
> >>> @@ -30,6 +30,10 @@ static int adxl345_i2c_probe(struct i2c_client *client,
> >>> bool use_int2 = false;
> >>> int irq;
> >>>
> >>> + if (!i2c_check_functionality(client->adapter,
> >>> + I2C_FUNC_SMBUS_READ_I2C_BLOCK))
> >>> + return -EOPNOTSUPP;
> >>
> >> And if driver works before, you make a regression here.
> > Absolutely. Need a fallback if it's not supported...
>
> I believe regmap has a fallback, so that check could simply be removed, I guess.
>
Yes, regmap does this check. I've seen it while working on the patchset.
I checked other drivers doing regmap and some have this check_functionality
check so I chose to include it because I'm not sure.
Will remove it on the next version.
Thanks,
Eva
prev parent reply other threads:[~2017-03-21 10:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 11:11 [PATCH 0/4] iio: accel: adxl345: Add support for buffered readings Eva Rachel Retuya
2017-03-13 11:11 ` [PATCH 1/4] dt-bindings: iio: accel: adxl345: Add optional interrupt-names support Eva Rachel Retuya
2017-03-20 19:34 ` Rob Herring
2017-03-13 11:11 ` [PATCH 2/4] iio: accel: adxl345_core: Introduce set_mode, drdy & get_triple functions Eva Rachel Retuya
2017-03-13 11:57 ` Andy Shevchenko
2017-03-15 21:41 ` Jonathan Cameron
2017-03-13 11:11 ` [PATCH 3/4] iio: accel: adxl345: Setup DATA_READY trigger Eva Rachel Retuya
2017-03-13 12:12 ` Andy Shevchenko
2017-03-15 9:49 ` Eva Rachel Retuya
2017-03-15 11:06 ` Andy Shevchenko
2017-03-13 11:11 ` [PATCH 4/4] iio: accel: adxl345: Add support for triggered buffer Eva Rachel Retuya
2017-03-13 12:16 ` Andy Shevchenko
2017-03-15 21:50 ` Jonathan Cameron
2017-03-20 19:46 ` Lars-Peter Clausen
2017-03-21 9:56 ` Eva Rachel Retuya [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=20170321095655.GA5213@Socrates-UM \
--to=eraretuya@gmail.com \
--cc=amsfield22@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=daniel.baluta@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=florian.vaussard@heig-vd.ch \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=michael.hennerich@analog.com \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).