Skip to content

Commit 1d17693

Browse files
committed
dt-bindings: hwmon: add bindings for max31732
Add device tree bindings for the Analog Devices MAX31732 temperature sensor driver under Documentation/devicetree/bindings/hwmon/. Signed-off-by: Sinan Divarci <sinan.divarci@analog.com>
1 parent bda881a commit 1d17693

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/hwmon/adi,max31732.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Analog Devices MAX31732 Temperature Sensor
8+
9+
maintainers:
10+
- Sinan Divarci <Sinan.Divarci@analog.com>
11+
12+
description: |
13+
The Analog Devices MAX31732 is a local plus four-channel remote temperature
14+
sensor that exposes two ALARM outputs, programmable limits and calibration
15+
aids. The driver reports readings through the Linux hwmon subsystem and can
16+
optionally use the ALARM pins as interrupts.
17+
18+
properties:
19+
compatible:
20+
const: adi,max31732
21+
22+
reg:
23+
description: I2C address of the device.
24+
maxItems: 1
25+
26+
interrupts:
27+
description: Optional ALARM1/ALARM2 interrupt lines.
28+
minItems: 1
29+
maxItems: 2
30+
31+
interrupt-names:
32+
description: Names matching the provided interrupts.
33+
minItems: 1
34+
maxItems: 2
35+
items:
36+
- const: ALARM1
37+
- const: ALARM2
38+
39+
adi,alarm1-interrupt-mode:
40+
type: boolean
41+
description: Use the ALARM1 output in interrupt (latching) mode.
42+
43+
adi,alarm2-interrupt-mode:
44+
type: boolean
45+
description: Use the ALARM2 output in interrupt (latching) mode.
46+
47+
adi,alarm1-fault-queue:
48+
description: Number of consecutive faults required to assert ALARM1.
49+
enum: [1, 2, 4, 6]
50+
default: 1
51+
52+
adi,alarm2-fault-queue:
53+
description: Number of consecutive faults required to assert ALARM2.
54+
enum: [1, 2, 4, 6]
55+
default: 1
56+
57+
adi,extended-range:
58+
type: boolean
59+
description: Enable the device extended range (+64 degC offset) at probe time.
60+
61+
adi,alarm1-mask:
62+
description: Bitmask disabling ALARM1 events per channel (bit0 = local channel).
63+
$ref: /schemas/types.yaml#/definitions/uint32
64+
minimum: 0
65+
maximum: 0x1f
66+
67+
adi,alarm2-mask:
68+
description: Bitmask disabling ALARM2 events per channel (bit0 = local channel).
69+
$ref: /schemas/types.yaml#/definitions/uint32
70+
minimum: 0
71+
maximum: 0x1f
72+
73+
required:
74+
- compatible
75+
- reg
76+
77+
additionalProperties: false
78+
79+
examples:
80+
- |
81+
#include <dt-bindings/interrupt-controller/irq.h>
82+
#include <dt-bindings/gpio/gpio.h>
83+
84+
i2c {
85+
#address-cells = <1>;
86+
#size-cells = <0>;
87+
88+
sensor@1c {
89+
compatible = "adi,max31732";
90+
reg = <0x1c>;
91+
interrupt-parent = <&gpio>;
92+
interrupts = <17 IRQ_TYPE_EDGE_FALLING>, <27 IRQ_TYPE_EDGE_FALLING>;
93+
interrupt-names = "ALARM1", "ALARM2";
94+
adi,alarm1-interrupt-mode;
95+
adi,alarm1-fault-queue = <4>;
96+
adi,alarm2-fault-queue = <2>;
97+
adi,extended-range;
98+
adi,alarm1-mask = <0x08>;
99+
adi,alarm2-mask = <0x10>;
100+
};
101+
};

0 commit comments

Comments
 (0)