Skip to content

Commit 82e4345

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 6851115 commit 82e4345

File tree

2 files changed

+126
-0
lines changed

2 files changed

+126
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
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+
description: |
28+
I2C address of slave device.
29+
30+
vdd-supply:
31+
description: |
32+
Analog Supply Voltage Input. Must have values in the interval (1.7V; 5.5V)
33+
in order for the device to function correctly.
34+
35+
powerdown-gpios:
36+
description: |
37+
GPIO spec for CVT/PDB pin. Should be configured with GPIO_ACTIVE_LOW.
38+
maxItems: 1
39+
40+
interrupts:
41+
description: |
42+
Connected to INT pin. Should be configured with type IRQ_TYPE_EDGE_BOTH.
43+
maxItems: 1
44+
45+
pwms:
46+
description: |
47+
If present, CVT/PDB pin is used for external temperature conversion. The
48+
active edge of CVT/PDB pin is the polarity of the PWM. Name of PWM should
49+
be "ext-cvt-pwm".
50+
51+
pwm-names:
52+
const: ext-cvt-pwm
53+
54+
adi,ext-conv-rising-edge:
55+
description:
56+
It is used to set the active edge of the EXT CVT to rising. By default,
57+
the active edge is falling.
58+
type: boolean
59+
60+
adi,int-output-drive-type:
61+
$ref: /schemas/types.yaml#/definitions/string
62+
description: |
63+
If present, value is the output drive type for the INT pin. Default is
64+
open drain with active low output. Other types are active drive to VDD &
65+
GND; "active-high" means the active level is high and "active-low" means
66+
the active level is low. If value is not present, open drain is used.
67+
enum: [active-high, active-low]
68+
69+
adi,roc-en:
70+
description: |
71+
If present, temperature change detection is enabled.
72+
type: boolean
73+
74+
adi,comp-int:
75+
description: |
76+
If present, comparator mode is used. If not present, interrupt mode is
77+
used (default).
78+
type: boolean
79+
80+
required:
81+
- compatible
82+
- reg
83+
- vdd-supply
84+
- powerdown-gpios
85+
86+
additionalProperties: false
87+
88+
examples:
89+
- |
90+
#include <dt-bindings/interrupt-controller/irq.h>
91+
#include <dt-bindings/gpio/gpio.h>
92+
#include <dt-bindings/pwm/pwm.h>
93+
94+
i2c {
95+
#address-cells = <1>;
96+
#size-cells = <0>;
97+
status = "okay";
98+
99+
temperature-sensor@40 {
100+
compatible = "adi,max30210";
101+
reg = <0x40>;
102+
vdd-supply = <&vdd>;
103+
powerdown-gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
104+
105+
interrupt-parent = <&gpio>;
106+
interrupts = <17 IRQ_TYPE_EDGE_BOTH>;
107+
108+
pwm-names = "ext-cvt-pwm";
109+
pwms = <&pwm 0 0>;
110+
adi,ext-conv-rising-edge;
111+
adi,int-output-drive-type = "active-high";
112+
adi,roc-en;
113+
adi,comp-int;
114+
};
115+
};
116+
...

MAINTAINERS

+10
Original file line numberDiff line numberDiff line change
@@ -12587,6 +12587,16 @@ 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+
M: Daniel Matyas <[email protected]>
12593+
12594+
S: Supported
12595+
W: https://ez.analog.com/linux-software-drivers
12596+
F: Documentation/ABI/testing/sysfs-bus-iio-temperature-max30210
12597+
F: Documentation/devicetree/bindings/iio/temperature/adi,max30210.yaml
12598+
F: drivers/iio/temperature/max30210.c
12599+
1259012600
MAX31827 TEMPERATURE SWITCH DRIVER
1259112601
M: Daniel Matyas <[email protected]>
1259212602

0 commit comments

Comments
 (0)