devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eva Rachel Retuya <eraretuya-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
Cc: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Andy Shevchenko
	<andy.shevchenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Hartmut Knaack <knaack.h-Mmb7MZpHnFY@public.gmane.org>,
	Peter Meerwald <pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>,
	Dmitry Torokhov
	<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Michael Hennerich
	<michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>,
	Daniel Baluta
	<daniel.baluta-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Alison Schofield
	<amsfield22-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Florian Vaussard
	<florian.vaussard-EWQkb/GNqlFyDzI6CaY1VQ@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>

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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2017-03-21  9:56 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
     [not found] ` <1489403497-27849-1-git-send-email-eraretuya-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-13 11:11   ` [PATCH 2/4] iio: accel: adxl345_core: Introduce set_mode, drdy & get_triple functions Eva Rachel Retuya
     [not found]     ` <1489403497-27849-3-git-send-email-eraretuya-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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
     [not found]     ` <1489403497-27849-4-git-send-email-eraretuya-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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
     [not found]     ` <1489403497-27849-5-git-send-email-eraretuya-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-13 12:16       ` Andy Shevchenko
     [not found]         ` <CAHp75VefS18nAH3HkQgNdmo5oUWoaQ7ctj=eXHx9XjwrJtZzuQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-15 21:50           ` Jonathan Cameron
2017-03-20 19:46             ` Lars-Peter Clausen
     [not found]               ` <f03e9577-41f9-8f1f-1963-3e8cbac5f979-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
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-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=amsfield22-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=andy.shevchenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=daniel.baluta-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=florian.vaussard-EWQkb/GNqlFyDzI6CaY1VQ@public.gmane.org \
    --cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=knaack.h-Mmb7MZpHnFY@public.gmane.org \
    --cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
    --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
    --cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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).