From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH 1/3] dt-bindings:iio:adc: convert adc.txt to yaml
Date: Sat, 28 Nov 2020 16:38:32 +0000 [thread overview]
Message-ID: <20201128163832.638a7801@archlinux> (raw)
In-Reply-To: <20201031182423.742798-2-jic23@kernel.org>
On Sat, 31 Oct 2020 18:24:21 +0000
Jonathan Cameron <jic23@kernel.org> wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Each driver that uses this will need to use a $ref
> We can't always enable it like most of the generic bindings due to
> channel@X matching far more widely than IIO.
This patch crossed with the introduction of a label attribute
to the txt file. As that was trivial I've just moved that
over to the yaml file and applied to the togreg branch of iio.git
and pushed out as testing for the autobuilders to play with it.
Thanks,
Jonathan
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
> .../devicetree/bindings/iio/adc/adc.txt | 23 -----------
> .../devicetree/bindings/iio/adc/adc.yaml | 38 +++++++++++++++++++
> 2 files changed, 38 insertions(+), 23 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/adc.txt b/Documentation/devicetree/bindings/iio/adc/adc.txt
> deleted file mode 100644
> index 5bbaa330a250..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/adc.txt
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -Common ADCs properties
> -
> -Optional properties for child nodes:
> -- bipolar : Boolean, if set the channel is used in bipolar mode.
> -- diff-channels : Differential channels muxed for this ADC. The first value
> - specifies the positive input pin, the second value the negative
> - input pin.
> -
> -Example:
> - adc@0 {
> - compatible = "some,adc";
> - ...
> - channel@0 {
> - bipolar;
> - diff-channels = <0 1>;
> - ...
> - };
> -
> - channel@1 {
> - diff-channels = <2 3>;
> - ...
> - };
> - };
> diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml
> new file mode 100644
> index 000000000000..328a4318feee
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/adc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic IIO bindings for ADC channels
> +
> +maintainers:
> + - Jonathan Cameron <jic23@kernel.org>
> +
> +description:
> + A few properties are defined in a common way ADC channels.
> +
> +properties:
> + $nodename:
> + pattern: "^channel(@[0-9a-f]+)?$"
> + description:
> + A channel index should match reg.
> +
> + reg:
> + maxItems: 1
> +
> + bipolar:
> + $ref: /schemas/types.yaml#/definitions/flag
> + description: If provided, the channel is to be used in bipolar mode.
> +
> + diff-channels:
> + $ref: /schemas/types.yaml#/definitions/uint32-array
> + maxItems: 2
> + minItems: 2
> + description:
> + Many ADCs have dual Muxes to allow different input pins to be routed
> + to both the positive and negative inputs of a differential ADC.
> + The first value specifies the positive input pin, the second
> + specifies the negative input pin.
> +
> +additionalProperties: true
next prev parent reply other threads:[~2020-11-28 22:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 18:24 [PATCH 0/3] dt-bindings:iio:adc: Convert generic ADC channel binding to yaml Jonathan Cameron
2020-10-31 18:24 ` [PATCH 1/3] dt-bindings:iio:adc: convert adc.txt " Jonathan Cameron
2020-11-28 16:38 ` Jonathan Cameron [this message]
2020-10-31 18:24 ` [PATCH 2/3] dt-bindings:iio:adc:adi,ad7124: Use the new adc.yaml channel binding Jonathan Cameron
2020-10-31 18:24 ` [PATCH 3/3] dt-bindings:iio:adc:adi,ad7292: Use new adc.yaml binding for channels Jonathan Cameron
2020-11-03 2:31 ` [PATCH 0/3] dt-bindings:iio:adc: Convert generic ADC channel binding to yaml Rob Herring
2020-11-28 16:39 ` 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=20201128163832.638a7801@archlinux \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-iio@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).