mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 23:24:50 +00:00
dt-bindings:iio:humidity:st,hts221 yaml conversion.
Straight forward conversion of this temperature and pressure sensor binding. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Rob Herring <robh@kernel.org> Cc: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/20201031134110.724233-4-jic23@kernel.org
This commit is contained in:
parent
3c055f31ac
commit
9a6ac31382
2 changed files with 52 additions and 30 deletions
|
@ -1,30 +0,0 @@
|
|||
* HTS221 STM humidity + temperature sensor
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "st,hts221"
|
||||
- reg: i2c address of the sensor / spi cs line
|
||||
|
||||
Optional properties:
|
||||
- drive-open-drain: the interrupt/data ready line will be configured
|
||||
as open drain, which is useful if several sensors share the same
|
||||
interrupt line. This is a boolean property.
|
||||
If the requested interrupt is configured as IRQ_TYPE_LEVEL_HIGH or
|
||||
IRQ_TYPE_EDGE_RISING a pull-down resistor is needed to drive the line
|
||||
when it is not active, whereas a pull-up one is needed when interrupt
|
||||
line is configured as IRQ_TYPE_LEVEL_LOW or IRQ_TYPE_EDGE_FALLING.
|
||||
Refer to pinctrl/pinctrl-bindings.txt for the property description.
|
||||
- interrupts: interrupt mapping for IRQ. It should be configured with
|
||||
flags IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_LOW or
|
||||
IRQ_TYPE_EDGE_FALLING.
|
||||
|
||||
Refer to interrupt-controller/interrupts.txt for generic interrupt
|
||||
client node bindings.
|
||||
|
||||
Example:
|
||||
|
||||
hts221@5f {
|
||||
compatible = "st,hts221";
|
||||
reg = <0x5f>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <0 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
|
@ -0,0 +1,52 @@
|
|||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/iio/humidity/st,hts221.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: HTS221 STM humidity + temperature sensor
|
||||
|
||||
maintainers:
|
||||
- Lorenzo Bianconi <lorenzo@kernel.org>
|
||||
|
||||
description: |
|
||||
Humidity and temperature sensor with I2C interface and data ready
|
||||
interrupt.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: st,hts221
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
drive-open-drain:
|
||||
type: boolean
|
||||
description:
|
||||
The interrupt/data ready line will be configured as open drain, which
|
||||
is useful if several sensors share the same interrupt line.
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
i2c {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
hts221@5f {
|
||||
compatible = "st,hts221";
|
||||
reg = <0x5f>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <0 IRQ_TYPE_EDGE_RISING>;
|
||||
};
|
||||
};
|
||||
...
|
Loading…
Reference in a new issue