Skip to content

Commit 6632b45

Browse files
DanielMatyasgroeck
authored andcommitted
dt-bindings: hwmon: Add possible new properties to max31827 bindings
These modify the corresponding bits in the configuration register. adi,comp-int is a hardware property, because it affects the behavior of the interrupt signal and whatever it is connected to. adi,timeout-enable is a hardware property, because it affects i2c bus operation. Signed-off-by: Daniel Matyas <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 8824557 commit 6632b45

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

Documentation/devicetree/bindings/hwmon/adi,max31827.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,68 @@ properties:
3232
Must have values in the interval (1.6V; 3.6V) in order for the device to
3333
function correctly.
3434

35+
adi,comp-int:
36+
description:
37+
If present interrupt mode is used. If not present comparator mode is used
38+
(default).
39+
type: boolean
40+
41+
adi,alarm-pol:
42+
description:
43+
Sets the alarms active state.
44+
- 0 = active low
45+
- 1 = active high
46+
$ref: /schemas/types.yaml#/definitions/uint32
47+
enum: [0, 1]
48+
49+
adi,fault-q:
50+
description:
51+
Select how many consecutive temperature faults must occur before
52+
overtemperature or undertemperature faults are indicated in the
53+
corresponding status bits.
54+
$ref: /schemas/types.yaml#/definitions/uint32
55+
enum: [1, 2, 4, 8]
56+
57+
adi,timeout-enable:
58+
description:
59+
Enables timeout. Bus timeout resets the I2C-compatible interface when SCL
60+
is low for more than 30ms (nominal).
61+
type: boolean
62+
63+
allOf:
64+
- if:
65+
properties:
66+
compatible:
67+
contains:
68+
const: adi,max31829
69+
70+
then:
71+
properties:
72+
adi,alarm-pol:
73+
default: 1
74+
75+
else:
76+
properties:
77+
adi,alarm-pol:
78+
default: 0
79+
80+
- if:
81+
properties:
82+
compatible:
83+
contains:
84+
const: adi,max31827
85+
86+
then:
87+
properties:
88+
adi,fault-q:
89+
default: 1
90+
91+
else:
92+
properties:
93+
adi,fault-q:
94+
default: 4
95+
96+
3597
required:
3698
- compatible
3799
- reg
@@ -49,6 +111,10 @@ examples:
49111
compatible = "adi,max31827";
50112
reg = <0x42>;
51113
vref-supply = <&reg_vdd>;
114+
adi,comp-int;
115+
adi,alarm-pol = <0>;
116+
adi,fault-q = <1>;
117+
adi,timeout-enable;
52118
};
53119
};
54120
...

0 commit comments

Comments
 (0)