From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
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>
Subject: Re: [PATCH v2 3/4] iio: accel: adxl345: Setup DATA_READY trigger
Date: Sun, 14 May 2017 09:08:50 -0700 [thread overview]
Message-ID: <20170514160850.GA38271@dtor-ws> (raw)
In-Reply-To: <683cefe7-77f8-1671-85b0-286122b72c9d@kernel.org>
On Sun, May 14, 2017 at 04:15:37PM +0100, Jonathan Cameron wrote:
> On 10/05/17 14:24, Eva Rachel Retuya wrote:
> >On Wed, May 03, 2017 at 12:05:00AM +0300, Andy Shevchenko wrote:
> >>On Tue, May 2, 2017 at 3:15 PM, Eva Rachel Retuya <eraretuya@gmail.com> wrote:
> >>>On Mon, May 01, 2017 at 02:31:00PM +0300, Andy Shevchenko wrote:
> >>>[...]
> >>>>>-int adxl345_core_probe(struct device *dev, struct regmap *regmap,
> >>>>>+int adxl345_core_probe(struct device *dev, struct regmap *regmap, int irq,
> >>>>> const char *name);
> >>>>
> >>>>I think I commented this once. Instead of increasing parameters,
> >>>>please introduce a new struct (as separate preparatory patch) which
> >>>>will hold current parameters. Let's call it
> >>>>strut adxl345_chip {
> >>>> struct device *dev;
> >>>> struct regmap *regmap;
> >>>> const char *name;
> >>>>};
> >>>>
> >>>>I insisnt in this chage.
> >>>
> >>>I'm not sure if what you want is more simpler, is it something like what
> >>>this driver does?
> >>
> >>Nope. The driver you were referring to does the same you did.
> >>
> >>I'm proposing the above struct to be introduced along with changing
> >>prototype like:
> >>
> >> -int adxl345_core_probe(struct device *dev, struct regmap *regmap,
> >>const char *name);
> >> +int adxl345_core_probe(struct adxl345_chip *chip);
> >>
> >>In next patch adding interrupt would not touch prototypes at all!
> >>
> >
> >OK, got it. Thanks for clarifying.
> >
> >>>
> >>>http://lxr.free-electrons.com/source/drivers/iio/gyro/mpu3050.h#L41
> >>>http://lxr.free-electrons.com/source/drivers/iio/gyro/mpu3050-i2c.c#L34
> >>
> >>>>>+#include <linux/of_irq.h>
> >>>>
> >>>>Can we get rid of gnostic resource providers?
> >>>>
> >>>
> >>>I'm uninformed and still learning. Please let me know how to approach
> >>>this in some other way.
> >>
> >>I suppose something like platform_get_irq(); to use.
> >>But it would be nice to you to investigate more.
> >
> >I had a look and it seems I have to convert to platform_driver in order
> >to make use of that function. Is this correct?
> I believe Andy was suggesting a function 'similar to' that one rather
> than actually using platform_get_irq.
>
> It's not an area I know all that much about either, but there
> are moves to try and move the boiler plat needed to get the same
> parameters from devicetree and acpi into core library code so
> that a single function can be called to get the parameter in
> either case.
Well, we of course could look into moving bulk of platform_get_irq()
into generic device_get_irq(), but I think the main problem is that ACPI
(as far as I know) does not have notion of interrupt names...
Thanks.
--
Dmitry
next prev parent reply other threads:[~2017-05-14 16:08 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-29 7:48 [PATCH v2 0/4] iio: accel: adxl345: Add support for buffered readings Eva Rachel Retuya
2017-04-29 7:48 ` [PATCH v2 1/4] dt-bindings: iio: accel: adxl345: Add optional interrupt-names support Eva Rachel Retuya
2017-04-29 7:48 ` [PATCH v2 2/4] iio: accel: adxl345_core: Introduce set_mode and data_ready functions Eva Rachel Retuya
2017-05-01 0:22 ` Jonathan Cameron
2017-05-01 19:42 ` Andy Shevchenko
2017-05-01 19:48 ` Jonathan Cameron
2017-05-01 19:48 ` Jonathan Cameron
2017-05-01 20:07 ` Andy Shevchenko
2017-05-01 20:18 ` Jonathan Cameron
2017-05-02 11:39 ` Eva Rachel Retuya
2017-05-02 16:32 ` Jonathan Cameron
2017-05-10 13:07 ` Eva Rachel Retuya
2017-05-01 11:21 ` Andy Shevchenko
2017-05-02 11:46 ` Eva Rachel Retuya
2017-04-29 7:49 ` [PATCH v2 3/4] iio: accel: adxl345: Setup DATA_READY trigger Eva Rachel Retuya
2017-05-01 0:32 ` Jonathan Cameron
2017-05-02 3:01 ` Rob Herring
2017-05-02 15:59 ` Jonathan Cameron
2017-05-10 14:33 ` Eva Rachel Retuya
2017-05-02 11:59 ` Eva Rachel Retuya
2017-05-01 11:31 ` Andy Shevchenko
2017-05-02 12:15 ` Eva Rachel Retuya
2017-05-02 21:05 ` Andy Shevchenko
2017-05-10 13:24 ` Eva Rachel Retuya
2017-05-14 15:15 ` Jonathan Cameron
2017-05-14 16:08 ` Dmitry Torokhov [this message]
2017-05-05 18:26 ` Jonathan Cameron
2017-05-10 13:31 ` Eva Rachel Retuya
2017-04-29 7:49 ` [PATCH v2 4/4] iio: accel: adxl345: Add support for triggered buffer Eva Rachel Retuya
2017-05-01 0:42 ` Jonathan Cameron
2017-05-02 12:23 ` Eva Rachel Retuya
2017-05-02 16:08 ` Jonathan Cameron
2017-05-01 11:24 ` Andy Shevchenko
2017-05-02 12:24 ` Eva Rachel Retuya
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=20170514160850.GA38271@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=amsfield22@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=daniel.baluta@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=michael.hennerich@analog.com \
--cc=pmeerw@pmeerw.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.