-
Notifications
You must be signed in to change notification settings - Fork 876
Add support for MAX30210 #2544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jemfgeronimo
wants to merge
3
commits into
analogdevicesinc:main
Choose a base branch
from
jemfgeronimo:dev/max30210
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add support for MAX30210 #2544
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
114 changes: 114 additions & 0 deletions
114
Documentation/devicetree/bindings/iio/temperature/adi,max30210.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}; | ||
}; | ||
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12587,6 +12587,14 @@ 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 | ||
F: drivers/iio/temperature/max30210.c | ||
|
||
MAX31827 TEMPERATURE SWITCH DRIVER | ||
M: Daniel Matyas <[email protected]> | ||
L: [email protected] | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,3 +203,4 @@ config IIO_ALL_ADI_DRIVERS | |
imply ADRV9025 | ||
imply ADL5580 | ||
imply LTC2664 | ||
imply MAX30210 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.