diff mbox

[v3,5/9] staging: iio: ad2s1200: Add documentation for device tree binding

Message ID 0aa68c6684c2b45dd0af398c166d6b36c18be1af.1524432236.git.davidjulianveenstra@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

David Veenstra April 22, 2018, 10:03 p.m. UTC
Add documentation for the added device tree bindings.

Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com>
---
Changes in v3:
 - Documentation is added to Documentation/devicetree/bindings/iio/resolver
   instead of staging directory.
 - Add mention to ad2s1205 device.

 .../devicetree/bindings/iio/resolver/ad2s1200.txt        | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt

Comments

Rob Herring (Arm) April 27, 2018, 2:48 p.m. UTC | #1
On Mon, Apr 23, 2018 at 12:03:47AM +0200, David Veenstra wrote:
> Add documentation for the added device tree bindings.
> 
> Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com>
> ---
> Changes in v3:
>  - Documentation is added to Documentation/devicetree/bindings/iio/resolver
>    instead of staging directory.
>  - Add mention to ad2s1205 device.
> 
>  .../devicetree/bindings/iio/resolver/ad2s1200.txt        | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt b/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
> new file mode 100644
> index 000000000000..46b51db38368
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
> @@ -0,0 +1,16 @@
> +Analog Devices AD2S1200 and AD2S1205 Resolver-to-Digital Converter
> +
> +Required properties:
> + - compatible : should be "adi,ad2s1200" or "adi,ad2s1205"
> + - reg : the SPI chip select number of the device
> + - sample-gpios : The GPIO pin connected to the SAMPLE line of the AD2S1200
> + - rdvel-gpios : The GPIO pin connected to the RDVEL line of the AD2S1200

Are these gpios something that would be common to resolvers (whatever 
that is) or specific to this chip. For the latter, you need vendor 
prefixes.

> +
> +Example:
> +
> +	resolver {

Missing unit address.

> +		compatible = "adi,ad2s1200";
> +		reg = <4>;
> +		sample-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
> +		rdvel-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
> +	};
> -- 
> 2.16.2
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rob Herring (Arm) April 27, 2018, 2:49 p.m. UTC | #2
On Mon, Apr 23, 2018 at 12:03:47AM +0200, David Veenstra wrote:
> Add documentation for the added device tree bindings.
> 
> Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com>
> ---
> Changes in v3:
>  - Documentation is added to Documentation/devicetree/bindings/iio/resolver
>    instead of staging directory.

Also, update the subject. This is not part of staging. "dt-bindings: iio: .." 
is the preferred subject prefix.

>  - Add mention to ad2s1205 device.
> 
>  .../devicetree/bindings/iio/resolver/ad2s1200.txt        | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt b/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
> new file mode 100644
> index 000000000000..46b51db38368
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
> @@ -0,0 +1,16 @@
> +Analog Devices AD2S1200 and AD2S1205 Resolver-to-Digital Converter
> +
> +Required properties:
> + - compatible : should be "adi,ad2s1200" or "adi,ad2s1205"
> + - reg : the SPI chip select number of the device
> + - sample-gpios : The GPIO pin connected to the SAMPLE line of the AD2S1200
> + - rdvel-gpios : The GPIO pin connected to the RDVEL line of the AD2S1200
> +
> +Example:
> +
> +	resolver {
> +		compatible = "adi,ad2s1200";
> +		reg = <4>;
> +		sample-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
> +		rdvel-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
> +	};
> -- 
> 2.16.2
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jonathan Cameron April 28, 2018, 3:27 p.m. UTC | #3
On Fri, 27 Apr 2018 09:48:20 -0500
Rob Herring <robh@kernel.org> wrote:

> On Mon, Apr 23, 2018 at 12:03:47AM +0200, David Veenstra wrote:
> > Add documentation for the added device tree bindings.
> > 
> > Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com>
> > ---
> > Changes in v3:
> >  - Documentation is added to Documentation/devicetree/bindings/iio/resolver
> >    instead of staging directory.
> >  - Add mention to ad2s1205 device.
> > 
> >  .../devicetree/bindings/iio/resolver/ad2s1200.txt        | 16 ++++++++++++++++
> >  1 file changed, 16 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt b/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
> > new file mode 100644
> > index 000000000000..46b51db38368
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
> > @@ -0,0 +1,16 @@
> > +Analog Devices AD2S1200 and AD2S1205 Resolver-to-Digital Converter
> > +
> > +Required properties:
> > + - compatible : should be "adi,ad2s1200" or "adi,ad2s1205"
> > + - reg : the SPI chip select number of the device
> > + - sample-gpios : The GPIO pin connected to the SAMPLE line of the AD2S1200
> > + - rdvel-gpios : The GPIO pin connected to the RDVEL line of the AD2S1200  
> 
> Are these gpios something that would be common to resolvers (whatever 
> that is) or specific to this chip. For the latter, you need vendor 
> prefixes.

They are pretty chip specific I think, so prefixes needed.

I'd not really registered that gpios should be vendor prefixed for some reason
(kind of obvious now you mention it).  We have only a few from a quick grep
of the bindings for IIO devices (there are loads elsewhere that aren't and
are clearly very much part specific).  Ah well, will try and do better moving
forward on this!

Jonathan


> 
> > +
> > +Example:
> > +
> > +	resolver {  
> 
> Missing unit address.
> 
> > +		compatible = "adi,ad2s1200";
> > +		reg = <4>;
> > +		sample-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
> > +		rdvel-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
> > +	};
> > -- 
> > 2.16.2
> >   

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Veenstra May 18, 2018, 1 p.m. UTC | #4
On 28, April 2018 15:27, Jonathan Cameron wrote:

> On Fri, 27 Apr 2018 09:48:20 -0500
> Rob Herring <robh@kernel.org> wrote:
>
>> On Mon, Apr 23, 2018 at 12:03:47AM +0200, David Veenstra wrote:
>> > Add documentation for the added device tree bindings.
>> > 
>> > Signed-off-by: David Veenstra <davidjulianveenstra@gmail.com>
>> > ---
>> > Changes in v3:
>> >  - Documentation is added to Documentation/devicetree/bindings/iio/resolver
>> >    instead of staging directory.
>> >  - Add mention to ad2s1205 device.
>> > 
>> >  .../devicetree/bindings/iio/resolver/ad2s1200.txt        | 16 ++++++++++++++++
>> >  1 file changed, 16 insertions(+)
>> >  create mode 100644 Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
>> > 
>> > diff --git a/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt b/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
>> > new file mode 100644
>> > index 000000000000..46b51db38368
>> > --- /dev/null
>> > +++ b/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
>> > @@ -0,0 +1,16 @@
>> > +Analog Devices AD2S1200 and AD2S1205 Resolver-to-Digital Converter
>> > +
>> > +Required properties:
>> > + - compatible : should be "adi,ad2s1200" or "adi,ad2s1205"
>> > + - reg : the SPI chip select number of the device
>> > + - sample-gpios : The GPIO pin connected to the SAMPLE line of the AD2S1200
>> > + - rdvel-gpios : The GPIO pin connected to the RDVEL line of the AD2S1200  
>> 
>> Are these gpios something that would be common to resolvers (whatever 
>> that is) or specific to this chip. For the latter, you need vendor 
>> prefixes.
>
> They are pretty chip specific I think, so prefixes needed.
>
> I'd not really registered that gpios should be vendor prefixed for some reason
> (kind of obvious now you mention it).  We have only a few from a quick grep
> of the bindings for IIO devices (there are loads elsewhere that aren't and
> are clearly very much part specific).  Ah well, will try and do better moving
> forward on this!

The vendor prefixes are new to me. I'll add it in the next version.

Best regards,
David Veenstra

>
> Jonathan
>
>
>> 
>> > +
>> > +Example:
>> > +
>> > +	resolver {  
>> 
>> Missing unit address.
>> 
>> > +		compatible = "adi,ad2s1200";
>> > +		reg = <4>;
>> > +		sample-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
>> > +		rdvel-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
>> > +	};
>> > -- 
>> > 2.16.2
>> >   

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt b/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
new file mode 100644
index 000000000000..46b51db38368
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/resolver/ad2s1200.txt
@@ -0,0 +1,16 @@ 
+Analog Devices AD2S1200 and AD2S1205 Resolver-to-Digital Converter
+
+Required properties:
+ - compatible : should be "adi,ad2s1200" or "adi,ad2s1205"
+ - reg : the SPI chip select number of the device
+ - sample-gpios : The GPIO pin connected to the SAMPLE line of the AD2S1200
+ - rdvel-gpios : The GPIO pin connected to the RDVEL line of the AD2S1200
+
+Example:
+
+	resolver {
+		compatible = "adi,ad2s1200";
+		reg = <4>;
+		sample-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+		rdvel-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+	};