Re: [PATCH 28/29] dt-bindings:iio:temperature:maxim_thermocouple.txt to maxim,max31855k.yaml

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

 



On Sun, Oct 11, 2020 at 10:10 AM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
>
> Given we already have another maxim thermocouple driver that isn't
> covered by this binding it seems a better idea to chose to name it
> after a specific part.
>
> I added an additional example for the maxim,max6755 to illustrate
> the need for spi-cpha for that part.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> Cc: Matt Ranostay <matt.ranostay@xxxxxxxxxxxx>
> ---
>  .../iio/temperature/maxim,max31855k.yaml      | 76 +++++++++++++++++++
>  .../iio/temperature/maxim_thermocouple.txt    | 24 ------
>  2 files changed, 76 insertions(+), 24 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/temperature/maxim,max31855k.yaml b/Documentation/devicetree/bindings/iio/temperature/maxim,max31855k.yaml
> new file mode 100644
> index 000000000000..835e2d06b523
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/temperature/maxim,max31855k.yaml
> @@ -0,0 +1,76 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/temperature/maxim,max31855k.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Maxim MAX31855 and similar thermocouples
> +
> +maintainers:
> +  - Matt Ranostay <matt.ranostay@xxxxxxxxxxxx>
> +
> +description: |
> +  https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf
> +  https://datasheets.maximintegrated.com/en/ds/MAX31855.pdf
> +
> +properties:
> +  compatible:
> +    description:
> +      The generic maxim,max31855 compatible is deprecated in favour of
> +      the thermocouple type specific varients.

Typo of "variants"

Otherwise looks good to me.

Acked-by: Matt Ranostay <matt.ranostay@xxxxxxxxxxxx>

> +    enum:
> +      - maxim,max6675
> +      - maxim,max31855
> +      - maxim,max31855k
> +      - maxim,max31855j
> +      - maxim,max31855n
> +      - maxim,max31855s
> +      - maxim,max31855t
> +      - maxim,max31855e
> +      - maxim,max31855r
> +
> +  reg:
> +    maxItems: 1
> +
> +  spi-max-frequency: true
> +  spi-cpha: true
> +
> +required:
> +  - compatible
> +  - reg
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - maxim,max6675
> +    then:
> +      required:
> +        - spi-cpha
> +    else:
> +      properties:
> +        spi-cpha: false
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        temp-sensor@0 {
> +            compatible = "maxim,max31855k";
> +            reg = <0>;
> +            spi-max-frequency = <4300000>;
> +        };
> +        temp-sensor@1 {
> +            compatible = "maxim,max6675";
> +            reg = <1>;
> +            spi-max-frequency = <4300000>;
> +            spi-cpha;
> +        };
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/iio/temperature/maxim_thermocouple.txt b/Documentation/devicetree/bindings/iio/temperature/maxim_thermocouple.txt
> deleted file mode 100644
> index bb85cd0e039c..000000000000
> --- a/Documentation/devicetree/bindings/iio/temperature/maxim_thermocouple.txt
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -Maxim thermocouple support
> -
> -* https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf
> -* https://datasheets.maximintegrated.com/en/ds/MAX31855.pdf
> -
> -Required properties:
> -
> -       - compatible: must be "maxim,max6675" or one of the following:
> -          "maxim,max31855k", "maxim,max31855j", "maxim,max31855n",
> -          "maxim,max31855s", "maxim,max31855t", "maxim,max31855e",
> -          "maxim,max31855r"; the generic "max,max31855" is deprecated.
> -       - reg: SPI chip select number for the device
> -       - spi-max-frequency: must be 4300000
> -       - spi-cpha: must be defined for max6675 to enable SPI mode 1
> -
> -       Refer to spi/spi-bus.txt for generic SPI slave bindings.
> -
> -Example:
> -
> -       max31855@0 {
> -               compatible = "maxim,max31855k";
> -               reg = <0>;
> -               spi-max-frequency = <4300000>;
> -       };
> --
> 2.28.0
>



[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