Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+52 -30
-30
Documentation/devicetree/bindings/iio/humidity/hts221.txt
··· 1 - * HTS221 STM humidity + temperature sensor 2 - 3 - Required properties: 4 - - compatible: should be "st,hts221" 5 - - reg: i2c address of the sensor / spi cs line 6 - 7 - Optional properties: 8 - - drive-open-drain: the interrupt/data ready line will be configured 9 - as open drain, which is useful if several sensors share the same 10 - interrupt line. This is a boolean property. 11 - If the requested interrupt is configured as IRQ_TYPE_LEVEL_HIGH or 12 - IRQ_TYPE_EDGE_RISING a pull-down resistor is needed to drive the line 13 - when it is not active, whereas a pull-up one is needed when interrupt 14 - line is configured as IRQ_TYPE_LEVEL_LOW or IRQ_TYPE_EDGE_FALLING. 15 - Refer to pinctrl/pinctrl-bindings.txt for the property description. 16 - - interrupts: interrupt mapping for IRQ. It should be configured with 17 - flags IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_LOW or 18 - IRQ_TYPE_EDGE_FALLING. 19 - 20 - Refer to interrupt-controller/interrupts.txt for generic interrupt 21 - client node bindings. 22 - 23 - Example: 24 - 25 - hts221@5f { 26 - compatible = "st,hts221"; 27 - reg = <0x5f>; 28 - interrupt-parent = <&gpio0>; 29 - interrupts = <0 IRQ_TYPE_EDGE_RISING>; 30 - };
+52
Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/iio/humidity/st,hts221.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: HTS221 STM humidity + temperature sensor 8 + 9 + maintainers: 10 + - Lorenzo Bianconi <lorenzo@kernel.org> 11 + 12 + description: | 13 + Humidity and temperature sensor with I2C interface and data ready 14 + interrupt. 15 + 16 + properties: 17 + compatible: 18 + const: st,hts221 19 + 20 + reg: 21 + maxItems: 1 22 + 23 + drive-open-drain: 24 + type: boolean 25 + description: 26 + The interrupt/data ready line will be configured as open drain, which 27 + is useful if several sensors share the same interrupt line. 28 + 29 + interrupts: 30 + maxItems: 1 31 + 32 + required: 33 + - compatible 34 + - reg 35 + 36 + additionalProperties: false 37 + 38 + examples: 39 + - | 40 + #include <dt-bindings/interrupt-controller/irq.h> 41 + i2c { 42 + #address-cells = <1>; 43 + #size-cells = <0>; 44 + 45 + hts221@5f { 46 + compatible = "st,hts221"; 47 + reg = <0x5f>; 48 + interrupt-parent = <&gpio0>; 49 + interrupts = <0 IRQ_TYPE_EDGE_RISING>; 50 + }; 51 + }; 52 + ...