From: "Sa, Nuno" <Nuno.Sa@analog.com>
To: "robh@kernel.org" <robh@kernel.org>
Cc: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"pmeerw@pmeerw.net" <pmeerw@pmeerw.net>,
"lars@metafoo.de" <lars@metafoo.de>,
"Ardelean, Alexandru" <alexandru.Ardelean@analog.com>,
"jic23@kernel.org" <jic23@kernel.org>,
"knaack.h@gmx.de" <knaack.h@gmx.de>,
"Hennerich, Michael" <Michael.Hennerich@analog.com>
Subject: Re: [PATCH 5/5] dt-bindings: iio: Add adis16475 documentation
Date: Tue, 3 Mar 2020 09:59:24 +0000 [thread overview]
Message-ID: <5661b3f80a7fd041989b30d2f9ca76bfa762499d.camel@analog.com> (raw)
In-Reply-To: <1054e87af61518d73dfcb0995e7aab7484e81630.camel@analog.com>
On Tue, 2020-03-03 at 09:43 +0000, Sa, Nuno wrote:
> [External]
>
> On Mon, 2020-03-02 at 16:22 -0600, Rob Herring wrote:
> > On Tue, Feb 25, 2020 at 01:41:52PM +0100, Nuno Sá wrote:
> > > Document the ADIS16475 device devicetree bindings.
> > >
> > > Signed-off-by: Nuno Sá <nuno.sa@analog.com>
> > > ---
> > > .../bindings/iio/imu/adi,adis16475.yaml | 130
> > > ++++++++++++++++++
> > > MAINTAINERS | 1 +
> > > 2 files changed, 131 insertions(+)
> > > create mode 100644
> > > Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
> > > b/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
> > > new file mode 100644
> > > index 000000000000..c0f2146e000c
> > > --- /dev/null
> > > +++
> > > b/Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml
> > > @@ -0,0 +1,130 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/iio/imu/adi,adis16475.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Analog Devices ADIS16475 and similar IMUs
> > > +
> > > +maintainers:
> > > + - Nuno Sá <nuno.sa@analog.com>
> > > +
> > > +description: |
> > > + Analog Devices ADIS16475 and similar IMUs
> > > +
> > > https://www.analog.com/media/en/technical-documentation/data-sheets/ADIS16475.pdf
> > > +
> > > +properties:
> > > + compatible:
> > > + enum:
> > > + - adi,adis16475-1
> > > + - adi,adis16475-2
> > > + - adi,adis16475-3
> > > + - adi,adis16477-1
> > > + - adi,adis16477-2
> > > + - adi,adis16477-3
> > > + - adi,adis16470
> > > + - adi,adis16465-1
> > > + - adi,adis16465-2
> > > + - adi,adis16465-3
> > > + - adi,adis16467-1
> > > + - adi,adis16467-2
> > > + - adi,adis16467-3
> > > + - adi,adis16500
> > > + - adi,adis16505-1
> > > + - adi,adis16505-2
> > > + - adi,adis16505-3
> > > + - adi,adis16507-1
> > > + - adi,adis16507-2
> > > + - adi,adis16507-3
> > > +
> > > + reg:
> > > + maxItems: 1
> > > +
> > > + spi-cpha: true
> > > +
> > > + spi-cpol: true
> > > +
> > > + spi-max-frequency:
> > > + maximum: 2000000
> > > +
> > > + interrupts:
> > > + maxItems: 1
> > > +
> > > + clocks:
> > > + maxItems: 1
> > > +
> > > + clock-names:
> > > + oneOf:
> > > + - const: sync
> > > + - const: direct-sync
> > > + - const: pulse-sync
> > > + - const: scaled-sync
> >
> > According to the datasheet I looked at, the input is called 'sync'.
> > It
> > looks like you are mixing operating mode and clock connection.
>
> The sync pin is where the external clock should be connected (when
> available). I'm kinda of using the clock-name property as a way of
> selecting the mode the user wants to use as done in other devices (
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/iio/imu/adi,adis16480.txt
> ). In the end, what we should have in the sync pin is an external
> clock
> with the exception of the `sync` mode. I guess this one could be
> called
> output-sync and, in this case, the sync pin is actually an output pin
> pulsing when the internal processor collects data.
>
> I'm ok in changing it if there's a better way of doing it... Do you
> have any suggestion?
>
> -Nuno Sá
So, you mean having the clock-name only as "sync" (or maybe even
removing it?) and having a dedicated property like clock-mode?
-Nuno Sá
> > > +
> > > + reset-gpios:
> > > + description:
> > > + Must be the device tree identifier of the RESET pin. If
> > > specified,
> > > + it will be asserted during driver probe. As the line is
> > > active low,
> > > + it should be marked GPIO_ACTIVE_LOW.
> > > + maxItems: 1
> > > +
> > > + adi,scaled-output-hz:
> > > + description:
> > > + This property must be present if the clock mode is scaled-
> > > sync through
> > > + clock-names property. In this mode, the input clock can
> > > have
> > > a range
> > > + of 1Hz to 128HZ which must be scaled to originate an
> > > allowable sample
> > > + rate. This property specifies that rate.
> > > + minimum: 1900
> > > + maximum: 2100
> > > +
> > > +required:
> > > + - compatible
> > > + - reg
> > > + - interrupts
> > > + - spi-cpha
> > > + - spi-cpol
> > > +
> > > +if:
> > > + properties:
> > > + compatible:
> > > + contains:
> > > + enum:
> > > + - adi,adis16500
> > > + - adi,adis16505-1
> > > + - adi,adis16505-2
> > > + - adi,adis16505-3
> > > + - adi,adis16507-1
> > > + - adi,adis16507-2
> > > + - adi,adis16507-3
> > > +
> > > +then:
> > > + properties:
> > > + clock-names:
> > > + oneOf:
> > > + - const: sync
> > > + - const: direct-sync
> > > + - const: scaled-sync
> > > +
> > > + adi,burst32-enable:
> > > + description:
> > > + Enable burst32 mode. In this mode, a burst reading
> > > contains calibrated
> > > + gyroscope and accelerometer data in 32-bit format.
> > > + type: boolean
> > > +
> > > +examples:
> > > + - |
> > > + #include <dt-bindings/interrupt-controller/irq.h>
> > > + spi {
> > > + #address-cells = <1>;
> > > + #size-cells = <0>;
> > > +
> > > + adis16475: adis16475-3@0 {
> > > + compatible = "adi,adis16475-3";
> > > + reg = <0>;
> > > + spi-cpha;
> > > + spi-cpol;
> > > + spi-max-frequency = <2000000>;
> > > + interrupts = <4 IRQ_TYPE_EDGE_RISING>;
> > > + interrupt-parent = <&gpio>;
> > > + };
> > > + };
> > > +...
> > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > index f11262f1f3bb..f8ccc92ab378 100644
> > > --- a/MAINTAINERS
> > > +++ b/MAINTAINERS
> > > @@ -1015,6 +1015,7 @@ W:
> > > http://ez.analog.com/community/linux-device-drivers
> > > S: Supported
> > > F: drivers/iio/imu/adis16475.c
> > > F: Documentation/ABI/testing/sysfs-bus-iio-imu-adis16475
> > > +F: Documentation/devicetree/bindings/iio/imu/adi,adis16475
> > > .yaml
> > >
> > > ANALOG DEVICES INC ADM1177 DRIVER
> > > M: Beniamin Bia <beniamin.bia@analog.com>
> > > --
> > > 2.25.1
next prev parent reply other threads:[~2020-03-03 9:59 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 12:41 [PATCH 0/5] Support ADIS16475 and similar IMUs Nuno Sá
2020-02-25 12:41 ` [PATCH 1/5] iio: imu: adis: Add Managed device functions Nuno Sá
2020-03-03 20:38 ` Jonathan Cameron
2020-03-04 17:28 ` Sa, Nuno
2020-02-25 12:41 ` [PATCH 2/5] iio: imu: adis: Add irq mask variable Nuno Sá
2020-03-03 20:40 ` Jonathan Cameron
2020-03-04 17:29 ` Sa, Nuno
2020-02-25 12:41 ` [PATCH 3/5] iio: adis: Add adis_update_bits() APIs Nuno Sá
2020-03-03 20:48 ` Jonathan Cameron
2020-03-04 17:32 ` Sa, Nuno
2020-02-25 12:41 ` [PATCH 4/5] iio: imu: Add support for adis16475 Nuno Sá
2020-03-03 21:08 ` Jonathan Cameron
2020-03-04 17:59 ` Sa, Nuno
2020-03-05 9:58 ` Sa, Nuno
2020-03-05 10:39 ` Lars-Peter Clausen
2020-03-07 11:25 ` Jonathan Cameron
2020-03-07 11:27 ` Jonathan Cameron
2020-02-25 12:41 ` [PATCH 5/5] dt-bindings: iio: Add adis16475 documentation Nuno Sá
2020-03-02 22:22 ` Rob Herring
2020-03-03 9:43 ` Sa, Nuno
2020-03-03 9:59 ` Sa, Nuno [this message]
2020-03-03 16:34 ` Rob Herring
2020-03-04 17:25 ` Sa, Nuno
2020-03-03 21:10 ` Jonathan Cameron
2020-03-04 18:00 ` Sa, Nuno
2020-03-05 10:34 ` Lars-Peter Clausen
2020-03-05 12:27 ` Sa, Nuno
2020-03-05 12:43 ` Lars-Peter Clausen
2020-03-05 13:04 ` Sa, Nuno
2020-03-07 11:33 ` Jonathan Cameron
2020-03-07 20:47 ` nunojsa
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=5661b3f80a7fd041989b30d2f9ca76bfa762499d.camel@analog.com \
--to=nuno.sa@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=alexandru.Ardelean@analog.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pmeerw@pmeerw.net \
--cc=robh@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