Re: [PATCH v4 1/3] iio: adc: ltc2496: provide device tree binding document

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

 



On Mon,  9 Dec 2019 21:32:46 +0100
Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:

> The ADC only requires the standard stuff for spi devices and a reference
> voltage.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
Thanks for figuring out what was wrong and fixing it up.

I've made a couple of small tweaks whilst applying.  See below.

Applied to the togreg branch of iio.git and pushed out as testing.
I'm not planning to do a pull request until at least next weekend
so plenty of time if a DT maintainer wants to take another look.

Thanks,

Jonathan

> ---
>  .../bindings/iio/adc/lltc,ltc2496.yaml        | 47 +++++++++++++++++++
>  1 file changed, 47 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml
> new file mode 100644
> index 000000000000..195c8c8f2f4c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml
> @@ -0,0 +1,47 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/lltc,ltc2496.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Linear Technology / Analog Devices LTC2496 ADC
> +
> +maintainers:
> + - Lars-Peter Clausen <lars@xxxxxxxxxx>
> + - Michael Hennerich <Michael.Hennerich@xxxxxxxxxx>
> + - Stefan Popa <stefan.popa@xxxxxxxxxx>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - lltc,ltc2496
> +
> +  vref-supply:
> +    description: phandle to an external regulator providing the reference voltage
> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/phandle
> +
> +  reg:
> +    description: spi chipselect number according to the usual spi bindings
> +
> +  spi-max-frequency:
> +    description: maximal spi bus frequency supported by the chip

dropped the "by the chip" as this is also about the wiring on the board.  If it
were just the chip, it could be put in the driver.  The unknown bit is
if there is some other reason why it might need to be set lower than the maximum.

> +
> +required:
> +  - compatible
> +  - vref-supply
> +  - reg
> +
> +examples:
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        adc@0 {
> +        	compatible = "lltc,ltc2496";
You can't easily see it here, but this is a mixture of spaces
and tabs.  Should be all spaces.  I've tidied that up.
> +        	reg = <0>;
> +        	vref-supply = <&ltc2496_reg>;
> +        	spi-max-frequency = <2000000>;
> +        };
> +    };





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux