Commit 9559cb33 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Guenter Roeck
Browse files

dt-bindings: hwmon: lm90: convert to dtschema



Convert the National LM90 hwmon sensor bindings to DT schema format.

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210920181913.338772-1-krzysztof.kozlowski@canonical.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 000cc5bc
Loading
Loading
Loading
Loading
+0 −51
Original line number Diff line number Diff line
* LM90 series thermometer.

Required node properties:
- compatible: manufacturer and chip name, one of
		"adi,adm1032"
		"adi,adt7461"
		"adi,adt7461a"
		"gmt,g781"
		"national,lm90"
		"national,lm86"
		"national,lm89"
		"national,lm99"
		"dallas,max6646"
		"dallas,max6647"
		"dallas,max6649"
		"dallas,max6657"
		"dallas,max6658"
		"dallas,max6659"
		"dallas,max6680"
		"dallas,max6681"
		"dallas,max6695"
		"dallas,max6696"
		"onnn,nct1008"
		"winbond,w83l771"
		"nxp,sa56004"
		"ti,tmp451"

- reg: I2C bus address of the device

- vcc-supply: vcc regulator for the supply voltage.

Optional properties:
- interrupts: Contains a single interrupt specifier which describes the
              LM90 "-ALERT" pin output.
              See interrupt-controller/interrupts.txt for the format.

- #thermal-sensor-cells: should be set to 1. See thermal/thermal-sensor.yaml
	      for details. See <include/dt-bindings/thermal/lm90.h> for the
	      definition of the local, remote and 2nd remote sensor index
	      constants.

Example LM90 node:

temp-sensor {
	compatible = "onnn,nct1008";
	reg = <0x4c>;
	vcc-supply = <&palmas_ldo6_reg>;
	interrupt-parent = <&gpio>;
	interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
	#thermal-sensor-cells = <1>;
}
+79 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/national,lm90.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: LM90 series thermometer

maintainers:
  - Jean Delvare <jdelvare@suse.com>
  - Guenter Roeck <linux@roeck-us.net>

properties:
  compatible:
    enum:
      - adi,adm1032
      - adi,adt7461
      - adi,adt7461a
      - dallas,max6646
      - dallas,max6647
      - dallas,max6649
      - dallas,max6657
      - dallas,max6658
      - dallas,max6659
      - dallas,max6680
      - dallas,max6681
      - dallas,max6695
      - dallas,max6696
      - gmt,g781
      - national,lm86
      - national,lm89
      - national,lm90
      - national,lm99
      - nxp,sa56004
      - onnn,nct1008
      - ti,tmp451
      - winbond,w83l771


  interrupts:
    items:
      - description: |
          Single interrupt specifier which describes the LM90 "-ALERT" pin
          output.

  reg:
    maxItems: 1

  "#thermal-sensor-cells":
    const: 1

  vcc-supply:
    description: phandle to the regulator that provides the +VCC supply

required:
  - compatible
  - reg
  - vcc-supply

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/tegra-gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        sensor@4c {
            compatible = "onnn,nct1008";
            reg = <0x4c>;
            vcc-supply = <&palmas_ldo6_reg>;
            interrupt-parent = <&gpio>;
            interrupts = <TEGRA_GPIO(O, 4) IRQ_TYPE_LEVEL_LOW>;
            #thermal-sensor-cells = <1>;
        };
    };
+0 −4
Original line number Diff line number Diff line
@@ -41,10 +41,6 @@ properties:
          - adi,adp5585-02
            # Analog Devices ADP5589 Keypad Decoder and I/O Expansion
          - adi,adp5589
            # +/-1C TDM Extended Temp Range I.C
          - adi,adt7461
            # +/-1C TDM Extended Temp Range I.C
          - adt7461
            # AMS iAQ-Core VOC Sensor
          - ams,iaq-core
            # i2c serial eeprom  (24cxx)
+1 −1
Original line number Diff line number Diff line
@@ -10890,7 +10890,7 @@ LM90 HARDWARE MONITOR DRIVER
M:	Jean Delvare <jdelvare@suse.com>
L:	linux-hwmon@vger.kernel.org
S:	Maintained
F:	Documentation/devicetree/bindings/hwmon/lm90.txt
F:	Documentation/devicetree/bindings/hwmon/national,lm90.yaml
F:	Documentation/hwmon/lm90.rst
F:	drivers/hwmon/lm90.c
F:	include/dt-bindings/thermal/lm90.h