Skip to content

Commit

Permalink
dt-bindings: iio: temperature: add adi,max30210.yaml
Browse files Browse the repository at this point in the history
Add documentation for devicetree bindings for max30210

Signed-off-by: John Erasmus Mari Geronimo <[email protected]>
  • Loading branch information
jemfgeronimo committed Oct 17, 2024
1 parent 87685d0 commit 5668cc0
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 0 deletions.
114 changes: 114 additions & 0 deletions Documentation/devicetree/bindings/iio/temperature/adi,max30210.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright 2024 Analog Devices Inc.
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/temperature/adi,max30210.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices MAX30210 Low-Power I2C Digital Temperature Sensor

maintainers:
- Daniel Matyas <[email protected]>
- John Erasmus Mari Geronimo <[email protected]>

description: |
The MAX30210 operates from 1.7V to 2.0V supply voltage, and is a low-power,
high-accuracy digital temperature sensor with ±0.1°C accuracy from +20°C to
+50°C and ±0.15°C accuracy from -20°C to +85°C.
https://www.analog.com/media/en/technical-documentation/data-sheets/max30210.pdf
properties:
compatible:
enum:
- adi,max30210

reg:
maxItems: 1

vdd-supply:
description: |
Analog Supply Voltage Input. Must have values in the interval (1.7V; 5.5V)
in order for the device to function correctly.
powerdown-gpios:
description: |
GPIO spec for CVT/PDB pin. Should be configured with GPIO_ACTIVE_LOW.
maxItems: 1

interrupts:
description: |
Connected to INT pin. Should be configured with type IRQ_TYPE_EDGE_BOTH.
maxItems: 1

pwms:
description: |
If present, CVT/PDB pin is used for external temperature conversion. The
active edge of CVT/PDB pin is the polarity of the PWM. Name of PWM should
be "ext-cvt-pwm".
pwm-names:
const: ext-cvt-pwm

adi,ext-conv-rising-edge:
description:
It is used to set the active edge of the EXT CVT to rising. By default,
the active edge is falling.
type: boolean

adi,roc-en:
description: |
If present, temperature change detection is enabled.
type: boolean

adi,roc-len:
description: |
If present, this is the length of the rate of change filter. The rate of
change is calculated based on the number of samples selected in this
property. The user needs to set the appropriate number of samples to fit
the application needs. The default value is 2.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [2, 3, 5, 9, 17, 33, 65]

adi,comp-int:
description: |
If present, the device is in comparator mode. In this mode, the low
temperature threshold value acts as high temperature hysteresis. If not
present, interrupt mode is used (default).
type: boolean

required:
- compatible
- reg
- vdd-supply
- powerdown-gpios

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pwm/pwm.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
temperature-sensor@40 {
compatible = "adi,max30210";
reg = <0x40>;
vdd-supply = <&vdd>;
powerdown-gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
interrupt-parent = <&gpio>;
interrupts = <17 IRQ_TYPE_EDGE_BOTH>;
pwm-names = "ext-cvt-pwm";
pwms = <&pwm 0 0>;
adi,ext-conv-rising-edge;
adi,roc-en;
adi,comp-int;
};
};
...
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -12587,6 +12587,13 @@ F: Documentation/userspace-api/media/drivers/max2175.rst
F: drivers/media/i2c/max2175*
F: include/uapi/linux/max2175.h

MAX30210 IIO TEMPERATURE DRIVER
M: John Erasmus Mari Geronimo <[email protected]>
L: [email protected]
S: Supported
W: https://ez.analog.com/linux-software-drivers
F: Documentation/devicetree/bindings/iio/temperature/adi,max30210.yaml

MAX31827 TEMPERATURE SWITCH DRIVER
M: Daniel Matyas <[email protected]>
L: [email protected]
Expand Down

0 comments on commit 5668cc0

Please sign in to comment.