summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/hwmon/adi,max31827.yaml
blob: f60e06ab7d0a0897e782f8cfa04d12eadc64141d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/hwmon/adi,max31827.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices MAX31827, MAX31828, MAX31829 Low-Power Temperature Switch

maintainers:
  - Daniel Matyas <daniel.matyas@analog.com>

description: |
  Analog Devices MAX31827, MAX31828, MAX31829 Low-Power Temperature Switch with
  I2C Interface
  https://www.analog.com/media/en/technical-documentation/data-sheets/MAX31827-MAX31829.pdf

properties:
  compatible:
    oneOf:
      - const: adi,max31827
      - items:
          - enum:
              - adi,max31828
              - adi,max31829
          - const: adi,max31827

  reg:
    maxItems: 1

  vref-supply:
    description:
      Must have values in the interval (1.6V; 3.6V) in order for the device to
      function correctly.

  adi,comp-int:
    description:
      If present interrupt mode is used. If not present comparator mode is used
      (default).
    type: boolean

  adi,alarm-pol:
    description:
      Sets the alarms active state.
            - 0 = active low
            - 1 = active high
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [0, 1]

  adi,fault-q:
    description:
      Select how many consecutive temperature faults must occur before
      overtemperature or undertemperature faults are indicated in the
      corresponding status bits.
    $ref: /schemas/types.yaml#/definitions/uint32
    enum: [1, 2, 4, 8]

  adi,timeout-enable:
    description:
      Enables timeout. Bus timeout resets the I2C-compatible interface when SCL
      is low for more than 30ms (nominal).
    type: boolean

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: adi,max31829

    then:
      properties:
        adi,alarm-pol:
          default: 1

    else:
      properties:
        adi,alarm-pol:
          default: 0

  - if:
      properties:
        compatible:
          contains:
            const: adi,max31827

    then:
      properties:
        adi,fault-q:
          default: 1

    else:
      properties:
        adi,fault-q:
          default: 4


required:
  - compatible
  - reg
  - vref-supply

additionalProperties: false

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

        temperature-sensor@42 {
            compatible = "adi,max31827";
            reg = <0x42>;
            vref-supply = <&reg_vdd>;
            adi,comp-int;
            adi,alarm-pol = <0>;
            adi,fault-q = <1>;
            adi,timeout-enable;
        };
    };
...