All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishant Malpani <nish.malpani25@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	"Bogdan, Dragos" <dragos.bogdan@analog.com>,
	Darius <darius.berghe@analog.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-iio <linux-iio@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/3] dt-bindings: iio: gyro: adxrs290: Add required interrupts property
Date: Thu, 3 Sep 2020 18:16:28 +0530	[thread overview]
Message-ID: <CAEtfd9Z51qm29zECBzQrRGoiL5SuVJ6_=ZMA98gSCxEY6-CH1g@mail.gmail.com> (raw)
In-Reply-To: <20200829174845.7fae971d@archlinux>

Hello,

On Sat, Aug 29, 2020 at 10:18 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> On Tue, 25 Aug 2020 18:17:10 +0530
> Nishant Malpani <nish.malpani25@gmail.com> wrote:
>
> > Append 'interrupts' as a required property and provide a suitable example
> > for using a GPIO interrupt line.
> >
> > Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com>
> Hi Nishant,
>
> I don't understand why the interrupt is 'required'.  Also note you should
> never be adding required properties to an existing binding.  It's possible
> someone already used the binding as it stands and shipped a board with
> it burnt in a firmware. (bit unlikely but you never know!)
>
> Jonathan
>

You're right; I hadn't thought of it that way. Will remove the
'interrupts' property from the 'required' ist in v2.

> > ---
> >  .../devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml   | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml b/Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml
> > index 61adb2c2454b..cae593dd1ba7 100644
> > --- a/Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml
> > +++ b/Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml
> > @@ -28,17 +28,23 @@ properties:
> >
> >    spi-cpha: true
> >
> > +  interrupts:
> > +    maxItems: 1
> > +
> >  required:
> >    - compatible
> >    - reg
> >    - spi-max-frequency
> >    - spi-cpol
> >    - spi-cpha
> > +  - interrupts
>
> Why?  Device works fine without one being supplied.
> It's not uncommon on embedded boards to not wire up interrupts
> due to a lack of pins and just rely on polling.
>

I was under the impression that the triggered-buffer way of capturing
data would more reasonable to the consumers of a gyroscope. But what
you point out makes total sense. Thanks for pointing out. Will fix it
in v2.

With regards,
Nishant Malpani

> >
> >  additionalProperties: false
> >
> >  examples:
> >    - |
> > +    #include <dt-bindings/gpio/gpio.h>
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> >      spi {
> >          #address-cells = <1>;
> >          #size-cells = <0>;
> > @@ -48,6 +54,8 @@ examples:
> >                     spi-max-frequency = <5000000>;
> >                     spi-cpol;
> >                     spi-cpha;
> > +                   interrupt-parent = <&gpio>;
> > +                   interrupts = <25 IRQ_TYPE_EDGE_RISING>;
> >          };
> >      };
> >  ...
>

  reply	other threads:[~2020-09-03 12:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 12:47 [PATCH 0/3] iio: gyro: adxrs290: Add triggered buffer & debugfs support Nishant Malpani
2020-08-25 12:47 ` [PATCH 1/3] iio: gyro: adxrs290: Add triggered buffer support Nishant Malpani
2020-08-26 16:10   ` Andy Shevchenko
2020-09-02 10:31     ` Nishant Malpani
2020-08-29 16:46   ` Jonathan Cameron
2020-09-03 12:37     ` Nishant Malpani
2020-09-06 14:51       ` Jonathan Cameron
2020-08-25 12:47 ` [PATCH 2/3] dt-bindings: iio: gyro: adxrs290: Add required interrupts property Nishant Malpani
2020-08-29 16:48   ` Jonathan Cameron
2020-09-03 12:46     ` Nishant Malpani [this message]
2020-08-25 12:47 ` [PATCH 3/3] iio: gyro: adxrs290: Add debugfs register access support Nishant Malpani
2020-08-29 16:51   ` Jonathan Cameron

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='CAEtfd9Z51qm29zECBzQrRGoiL5SuVJ6_=ZMA98gSCxEY6-CH1g@mail.gmail.com' \
    --to=nish.malpani25@gmail.com \
    --cc=darius.berghe@analog.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dragos.bogdan@analog.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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.