From 17d1ffdfb643f08ca7cb60f43db6ee04f711c4b3 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 13:41:08 +0000 Subject: dt-bindings:iio:temperature:maxim,max31856 yaml conversion. Simple txt to yaml conversion of this binding. Paresh Chaudhary's email is bouncing so for now I've listed myself as maintainer. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201031134110.724233-28-jic23@kernel.org --- .../bindings/iio/temperature/max31856.txt | 24 ---------- .../bindings/iio/temperature/maxim,max31856.yaml | 54 ++++++++++++++++++++++ 2 files changed, 54 insertions(+), 24 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/temperature/max31856.txt create mode 100644 Documentation/devicetree/bindings/iio/temperature/maxim,max31856.yaml diff --git a/Documentation/devicetree/bindings/iio/temperature/max31856.txt b/Documentation/devicetree/bindings/iio/temperature/max31856.txt deleted file mode 100644 index 06ab43bb4de8..000000000000 --- a/Documentation/devicetree/bindings/iio/temperature/max31856.txt +++ /dev/null @@ -1,24 +0,0 @@ -Maxim MAX31856 thermocouple support - -https://datasheets.maximintegrated.com/en/ds/MAX31856.pdf - -Optional property: - - thermocouple-type: Type of thermocouple (THERMOCOUPLE_TYPE_K if - omitted). Supported types are B, E, J, K, N, R, S, T. - -Required properties: - - compatible: must be "maxim,max31856" - - reg: SPI chip select number for the device - - spi-max-frequency: As per datasheet max. supported freq is 5000000 - - spi-cpha: must be defined for max31856 to enable SPI mode 1 - - Refer to spi/spi-bus.txt for generic SPI slave bindings. - - Example: - temp-sensor@0 { - compatible = "maxim,max31856"; - reg = <0>; - spi-max-frequency = <5000000>; - spi-cpha; - thermocouple-type = ; - }; diff --git a/Documentation/devicetree/bindings/iio/temperature/maxim,max31856.yaml b/Documentation/devicetree/bindings/iio/temperature/maxim,max31856.yaml new file mode 100644 index 000000000000..873b34766676 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/temperature/maxim,max31856.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/temperature/maxim,max31856.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX31856 thermocouple support + +maintainers: + - Jonathan Cameron + +description: | + https://datasheets.maximintegrated.com/en/ds/MAX31856.pdf + +properties: + compatible: + const: maxim,max31856 + + reg: + maxItems: 1 + + spi-max-frequency: true + spi-cpha: true + + thermocouple-type: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Type of thermocouple (THERMOCOUPLE_TYPE_K if omitted). + Use defines in dt-bindings/iio/temperature/thermocouple.h. + Supported types are B, E, J, K, N, R, S, T. + +required: + - compatible + - reg + - spi-cpha + +additionalProperties: false + +examples: + - | + #include + spi { + #address-cells = <1>; + #size-cells = <0>; + + temp-sensor@0 { + compatible = "maxim,max31856"; + reg = <0>; + spi-max-frequency = <5000000>; + spi-cpha; + thermocouple-type = ; + }; + }; +... -- cgit v1.2.3