Skip to content

Commit 5668cc0

Browse files
committed
dt-bindings: iio: temperature: add adi,max30210.yaml
Add documentation for devicetree bindings for max30210 Signed-off-by: John Erasmus Mari Geronimo <[email protected]>
1 parent 87685d0 commit 5668cc0

File tree

2 files changed

+121
-0
lines changed

2 files changed

+121
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright 2024 Analog Devices Inc.
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/iio/temperature/adi,max30210.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Analog Devices MAX30210 Low-Power I2C Digital Temperature Sensor
9+
10+
maintainers:
11+
- Daniel Matyas <[email protected]>
12+
- John Erasmus Mari Geronimo <[email protected]>
13+
14+
description: |
15+
The MAX30210 operates from 1.7V to 2.0V supply voltage, and is a low-power,
16+
high-accuracy digital temperature sensor with ±0.1°C accuracy from +20°C to
17+
+50°C and ±0.15°C accuracy from -20°C to +85°C.
18+
https://www.analog.com/media/en/technical-documentation/data-sheets/max30210.pdf
19+
20+
properties:
21+
compatible:
22+
enum:
23+
- adi,max30210
24+
25+
reg:
26+
maxItems: 1
27+
28+
vdd-supply:
29+
description: |
30+
Analog Supply Voltage Input. Must have values in the interval (1.7V; 5.5V)
31+
in order for the device to function correctly.
32+
33+
powerdown-gpios:
34+
description: |
35+
GPIO spec for CVT/PDB pin. Should be configured with GPIO_ACTIVE_LOW.
36+
maxItems: 1
37+
38+
interrupts:
39+
description: |
40+
Connected to INT pin. Should be configured with type IRQ_TYPE_EDGE_BOTH.
41+
maxItems: 1
42+
43+
pwms:
44+
description: |
45+
If present, CVT/PDB pin is used for external temperature conversion. The
46+
active edge of CVT/PDB pin is the polarity of the PWM. Name of PWM should
47+
be "ext-cvt-pwm".
48+
49+
pwm-names:
50+
const: ext-cvt-pwm
51+
52+
adi,ext-conv-rising-edge:
53+
description:
54+
It is used to set the active edge of the EXT CVT to rising. By default,
55+
the active edge is falling.
56+
type: boolean
57+
58+
adi,roc-en:
59+
description: |
60+
If present, temperature change detection is enabled.
61+
type: boolean
62+
63+
adi,roc-len:
64+
description: |
65+
If present, this is the length of the rate of change filter. The rate of
66+
change is calculated based on the number of samples selected in this
67+
property. The user needs to set the appropriate number of samples to fit
68+
the application needs. The default value is 2.
69+
$ref: /schemas/types.yaml#/definitions/uint32
70+
enum: [2, 3, 5, 9, 17, 33, 65]
71+
72+
adi,comp-int:
73+
description: |
74+
If present, the device is in comparator mode. In this mode, the low
75+
temperature threshold value acts as high temperature hysteresis. If not
76+
present, interrupt mode is used (default).
77+
type: boolean
78+
79+
required:
80+
- compatible
81+
- reg
82+
- vdd-supply
83+
- powerdown-gpios
84+
85+
additionalProperties: false
86+
87+
examples:
88+
- |
89+
#include <dt-bindings/interrupt-controller/irq.h>
90+
#include <dt-bindings/gpio/gpio.h>
91+
#include <dt-bindings/pwm/pwm.h>
92+
93+
i2c {
94+
#address-cells = <1>;
95+
#size-cells = <0>;
96+
status = "okay";
97+
98+
temperature-sensor@40 {
99+
compatible = "adi,max30210";
100+
reg = <0x40>;
101+
vdd-supply = <&vdd>;
102+
powerdown-gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
103+
104+
interrupt-parent = <&gpio>;
105+
interrupts = <17 IRQ_TYPE_EDGE_BOTH>;
106+
107+
pwm-names = "ext-cvt-pwm";
108+
pwms = <&pwm 0 0>;
109+
adi,ext-conv-rising-edge;
110+
adi,roc-en;
111+
adi,comp-int;
112+
};
113+
};
114+
...

MAINTAINERS

+7
Original file line numberDiff line numberDiff line change
@@ -12587,6 +12587,13 @@ F: Documentation/userspace-api/media/drivers/max2175.rst
1258712587
F: drivers/media/i2c/max2175*
1258812588
F: include/uapi/linux/max2175.h
1258912589

12590+
MAX30210 IIO TEMPERATURE DRIVER
12591+
M: John Erasmus Mari Geronimo <[email protected]>
12592+
12593+
S: Supported
12594+
W: https://ez.analog.com/linux-software-drivers
12595+
F: Documentation/devicetree/bindings/iio/temperature/adi,max30210.yaml
12596+
1259012597
MAX31827 TEMPERATURE SWITCH DRIVER
1259112598
M: Daniel Matyas <[email protected]>
1259212599

0 commit comments

Comments
 (0)