Re: [PATCH 1/3] dt-bindings:iio:adc: convert adc.txt to yaml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 31 Oct 2020 18:24:21 +0000
Jonathan Cameron <jic23@xxxxxxxxxx> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  .../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@xxxxxxxxxx>
> +
> +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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux