public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org, Rob Herring <robh+dt@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	devicetree@vger.kernel.org,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Michael Hennerich <michael.hennerich@analog.com>,
	Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v3 2/2] dt-bindings:iio:adc:adi,ad7474: Add missing binding document
Date: Sat, 24 Apr 2021 18:09:24 +0100	[thread overview]
Message-ID: <20210424180924.5ba2ca78@jic23-huawei> (raw)
In-Reply-To: <20210424170346.526242-3-jic23@kernel.org>

On Sat, 24 Apr 2021 18:03:46 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Let's just pretend that it says ad7476 in the patch title
(I'll fix it whilst applying).

Oops.

Jonathan

> 
> This binding covers class of simple SPI ADCs which only provide
> data output - they don't have MOSI pin.
> 
> The only real variation between them is over how many supplies they
> use and which one is used for the reference.
> 
> Michael listed as maintainer for this one as it is his driver and
> falls under the catch all MAINTAINERS entry for ADI devices.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Michael Hennerich <michael.hennerich@analog.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
> ---
>  .../bindings/iio/adc/adi,ad7476.yaml          | 174 ++++++++++++++++++
>  1 file changed, 174 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml
> new file mode 100644
> index 000000000000..cf711082ad7d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml
> @@ -0,0 +1,174 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright 2019 Analog Devices Inc.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/adi,ad7476.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: AD7476 and similar simple SPI ADCs from multiple manufacturers.
> +
> +maintainers:
> +  - Michael Hennerich <michael.hennerich@analog.com>
> +
> +description: |
> +  A lot of simple SPI ADCs have very straight forward interfaces.
> +  They typically don't provide a MOSI pin, simply reading out data
> +  on MISO when the clock toggles.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - adi,ad7091
> +      - adi,ad7091r
> +      - adi,ad7273
> +      - adi,ad7274
> +      - adi,ad7276
> +      - adi,ad7277
> +      - adi,ad7278
> +      - adi,ad7466
> +      - adi,ad7467
> +      - adi,ad7468
> +      - adi,ad7475
> +      - adi,ad7476
> +      - adi,ad7476a
> +      - adi,ad7477
> +      - adi,ad7477a
> +      - adi,ad7478
> +      - adi,ad7478a
> +      - adi,ad7495
> +      - adi,ad7910
> +      - adi,ad7920
> +      - adi,ad7940
> +      - ti,adc081s
> +      - ti,adc101s
> +      - ti,adc121s
> +      - ti,ads7866
> +      - ti,ads7867
> +      - ti,ads7868
> +      - lltc,ltc2314-14
> +
> +  reg:
> +    maxItems: 1
> +
> +  vcc-supply:
> +    description:
> +      Main powersupply voltage for the chips, sometimes referred to as VDD on
> +      datasheets.  If there is no separate vref-supply, then this is needed
> +      to establish channel scaling.
> +
> +  vdrive-supply:
> +    description:
> +      Some devices have separate supply for their digital control side.
> +
> +  vref-supply:
> +    description:
> +      Some devices have a specific reference voltage supplied on a different pin
> +      to the other supplies. Needed to be able to establish channel scaling
> +      unless there is also an internal reference available (e.g. ad7091r)
> +
> +  spi-max-frequency: true
> +
> +  adi,conversion-start-gpios:
> +    description: A GPIO used to trigger the start of a conversion
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +allOf:
> +  # Devices where reference is vcc
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - adi,ad7091
> +              - adi,ad7276
> +              - adi,ad7277
> +              - adi,ad7278
> +              - adi,ad7466
> +              - adi,ad7467
> +              - adi,ad7468
> +              - adi,ad7940
> +              - ti,adc081s
> +              - ti,adc101s
> +              - ti,adc121s
> +              - ti,ads7866
> +              - ti,ads7868
> +      required:
> +        - vcc-supply
> +  # Devices with a vref
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - adi,ad7091r
> +              - adi,ad7273
> +              - adi,ad7274
> +              - adi,ad7475
> +              - lltc,ltc2314-14
> +    then:
> +      properties:
> +        vref-supply: true
> +    else:
> +      properties:
> +        vref-supply: false
> +  # Devices with a vref where it is not optional
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - adi,ad7273
> +              - adi,ad7274
> +              - adi,ad7475
> +              - lltc,ltc2314-14
> +    then:
> +      required:
> +        - vref-supply
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - adi,ad7475
> +              - adi,ad7495
> +    then:
> +      properties:
> +        vdrive-supply: true
> +    else:
> +      properties:
> +        vdrive-supply: false
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - adi,ad7091
> +              - adi,ad7091r
> +    then:
> +      properties:
> +        adi,conversion-start-gpios: true
> +    else:
> +      properties:
> +        adi,conversion-start-gpios: false
> +
> +examples:
> +  - |
> +    spi {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      adc@0 {
> +        compatible = "adi,ad7091r";
> +        reg = <0>;
> +        spi-max-frequency = <5000000>;
> +        vcc-supply = <&adc_vcc>;
> +        vref-supply = <&adc_vref>;
> +      };
> +    };
> +...


      reply	other threads:[~2021-04-24 17:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24 17:03 [PATCH v3 0/2] iio:adc:ad7476: Regulator support and binding doc Jonathan Cameron
2021-04-24 17:03 ` [PATCH v3 1/2] iio:adc:ad7476: Handle the different regulators used by various parts Jonathan Cameron
2021-04-24 18:20   ` Lars-Peter Clausen
2021-04-25 15:18     ` Jonathan Cameron
2021-04-25 16:02       ` Jonathan Cameron
2021-04-25 16:07         ` Lars-Peter Clausen
2021-04-24 17:03 ` [PATCH v3 2/2] dt-bindings:iio:adc:adi,ad7474: Add missing binding document Jonathan Cameron
2021-04-24 17:09   ` Jonathan Cameron [this message]

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=20210424180924.5ba2ca78@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=robh+dt@kernel.org \
    --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