All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: Song Qiang <songqiang1304521@gmail.com>
Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
	robh+dt@kernel.org, mark.rutland@arm.com,
	himanshujha199640@gmail.com, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] dt-bindings: Add PNI RM3100 device tree binding.
Date: Sun, 7 Oct 2018 16:20:20 +0100	[thread overview]
Message-ID: <20181007162020.6535767e@archlinux> (raw)
In-Reply-To: <20181007161808.44a61d45@archlinux>

On Sun, 7 Oct 2018 16:18:08 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> On Tue,  2 Oct 2018 22:38:11 +0800
> Song Qiang <songqiang1304521@gmail.com> wrote:
> 
> > Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
> > ---
> >  .../bindings/iio/magnetometer/pni,rm3100.txt  | 20 +++++++++++++++++++
> >  1 file changed, 20 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt b/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt
> > new file mode 100644
> > index 000000000000..4677690fc5d0
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt
> > @@ -0,0 +1,20 @@
> > +* PNI RM3100 3-axis magnetometer sensor
> > +
> > +Required properties:
> > +
> > +- compatible : should be "pni,rm3100"
> > +- reg : the I2C address or SPI chip select number of the sensor.
> > +
> > +Optional properties:
> > +
> > +- interrupts: data ready (DRDY) from the chip.
> > +  The interrupts can be triggered on rising edges.  
> From Phil's response this appears to be incorrect and
> it's actually a level sensitive interrupt.
> I haven't checked the data sheet to confirm this.
> 
> That'll bring all sorts of pain if you have a host that can only
> do edge sensitive so I'm hoping that's not true for you
> (edge sensitive only interrupts on hosts are pretty unusual
> though it cause me a lot of problems when I started out
> with IIO years ago :(
> 
> The docs aren't super clear on this.  The subtlety is
> whether there is a guaranteed 'low' time between reading the
> data and it going high again due to another reading.  This usually
> only matters if you are running very quickly though so may be
> fine here.
> 
> This will only become relevant with continuous mode if you
> add support for that later (I think!)
I realised just after I sent this that I was being unclear.

If you aren't doing continuous mode and hence have a fairly
strong guarantee of a decent gap between reads, you may be
able to get away with supporting either LEVEL or EDGE
interrupts.  In continuous mode, it is necessary to have
a minimum low time for EDGE interrupts to work.

Jonathan
> 
> Jonathan
> 
> > +
> > +Example:
> > +
> > +rm3100: rm3100@20 {
> > +	compatible = "pni,rm3100";
> > +	reg = <0x20>;
> > +	interrupt-parent = <&gpio0>;
> > +	interrupts = <4 IRQ_TYPE_EDGE_RISING>;
> > +};  
> 

  reply	other threads:[~2018-10-07 22:28 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25  3:17 [PATCH 1/2] iio: magnetometer: Add DT support for PNI RM3100 Song Qiang
2018-09-25  3:17 ` [PATCH 2/2] iio: magnetometer: Add driver " Song Qiang
2018-09-25 13:30   ` Jonathan Cameron
2018-09-25 13:30     ` Jonathan Cameron
2018-09-25 14:36     ` Phil Reid
2018-09-26  1:49       ` Song Qiang
2018-09-26  2:30         ` Phil Reid
2018-09-26  8:09           ` Song Qiang
2018-09-27  1:57             ` Phil Reid
2018-09-29 11:37             ` Jonathan Cameron
2018-09-26  1:33     ` Song Qiang
2018-09-29 11:45       ` Jonathan Cameron
2018-09-25 17:50   ` Himanshu Jha
2018-09-26  2:24     ` Song Qiang
2018-09-25 13:05 ` [PATCH 1/2] iio: magnetometer: Add DT " Jonathan Cameron
2018-09-25 13:05   ` Jonathan Cameron
2018-10-02 14:38 ` [PATCH v3 0/3] Add support for PNI RM3100 magnetometer Song Qiang
2018-10-02 14:38   ` [PATCH v3 1/3] dt-bindings: Add PNI to the vendor prefixes Song Qiang
2018-10-02 14:38   ` [PATCH v3 2/3] dt-bindings: Add PNI RM3100 device tree binding Song Qiang
2018-10-07 15:18     ` Jonathan Cameron
2018-10-07 15:18       ` Jonathan Cameron
2018-10-07 15:20       ` Jonathan Cameron [this message]
2018-10-02 14:38   ` [PATCH v3 3/3] iio: magnetometer: Add driver support for PNI RM3100 Song Qiang
2018-10-03  1:42     ` Phil Reid
2018-10-07 15:07       ` Jonathan Cameron
2018-10-07 15:44     ` Jonathan Cameron
2018-10-11  4:35       ` Song Qiang
2018-10-13  9:24         ` Jonathan Cameron
2018-10-13  9:24           ` Jonathan Cameron
2018-10-12  7:35   ` [PATCH v4 0/3] Add support for PNI RM3100 magnetometer Song Qiang
2018-10-12  7:35     ` [PATCH v4 1/3] dt-bindings: Add PNI to the vendor prefixes Song Qiang
2018-10-12 11:36       ` Rob Herring
2018-10-12 11:36         ` Rob Herring
2018-10-12  7:35     ` [PATCH v4 2/3] iio: magnetometer: Add DT support for PNI RM3100 Song Qiang
2018-10-12 11:37       ` Rob Herring
2018-10-12 11:37         ` Rob Herring
2018-10-12  7:35     ` [PATCH v4 3/3] iio: magnetometer: Add driver " Song Qiang
2018-10-12  8:36       ` Song Qiang
2018-10-12 12:53         ` Himanshu Jha
2018-10-17  8:00           ` Song Qiang
2018-10-21 14:08             ` Jonathan Cameron
2018-10-21 14:08               ` Jonathan Cameron
2018-10-13 10:19       ` Jonathan Cameron
2018-10-18  8:24         ` Song Qiang
2018-10-21 14:14           ` Jonathan Cameron
2018-10-21 14:14             ` Jonathan Cameron
2018-11-02  7:55             ` Song Qiang
2018-11-02  9:24               ` Jonathan Cameron
2018-11-02  9:24                 ` Jonathan Cameron
2018-11-05  0:39                 ` Song Qiang

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=20181007162020.6535767e@archlinux \
    --to=jic23@jic23.retrosnub.co.uk \
    --cc=devicetree@vger.kernel.org \
    --cc=himanshujha199640@gmail.com \
    --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=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=songqiang1304521@gmail.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 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.