From 7a24de38f0d4edc7330512f90cfe1895c5c4d1ea Mon Sep 17 00:00:00 2001 From: John Erasmus Mari Geronimo Date: Thu, 11 Jul 2024 18:03:25 +0800 Subject: [PATCH] dt-bindings: iio: temperature: add adi,max30210.yaml Add documentation for devicetree bindings for max30210 Signed-off-by: John Erasmus Mari Geronimo --- .../iio/temperature/adi,max30210.yaml | 116 ++++++++++++++++++ MAINTAINERS | 10 ++ 2 files changed, 126 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/temperature/adi,max30210.yaml diff --git a/Documentation/devicetree/bindings/iio/temperature/adi,max30210.yaml b/Documentation/devicetree/bindings/iio/temperature/adi,max30210.yaml new file mode 100644 index 00000000000000..5348ccdd3f63c1 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/temperature/adi,max30210.yaml @@ -0,0 +1,116 @@ +# 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 + - John Erasmus Mari Geronimo + +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 + description: | + I2C address of slave device. + + 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,int-output-drive-type: + $ref: /schemas/types.yaml#/definitions/string + description: | + If present, value is the output drive type for the INT pin. Default is + open drain with active low output. Other types are active drive to VDD & + GND; "active-high" means the active level is high and "active-low" means + the active level is low. If value is not present, open drain is used. + enum: [active-high, active-low] + + adi,roc-en: + description: | + If present, temperature change detection is enabled. + type: boolean + + adi,comp-int: + description: | + If present, comparator mode is used. If not present, interrupt mode is + used (default). + type: boolean + +required: + - compatible + - reg + - vdd-supply + - powerdown-gpios + +additionalProperties: false + +examples: + - | + #include + #include + #include + + 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,int-output-drive-type = "active-high"; + adi,roc-en; + adi,comp-int; + }; + }; +... diff --git a/MAINTAINERS b/MAINTAINERS index 5aea9ad4ada5be..4d5898fc39819d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12587,6 +12587,16 @@ 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 +M: Daniel Matyas +L: linux-iio@vger.kernel.org +S: Supported +W: https://ez.analog.com/linux-software-drivers +F: Documentation/ABI/testing/sysfs-bus-iio-temperature-max30210 +F: Documentation/devicetree/bindings/iio/temperature/adi,max30210.yaml +F: drivers/iio/temperature/max30210.c + MAX31827 TEMPERATURE SWITCH DRIVER M: Daniel Matyas L: linux-hwmon@vger.kernel.org