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

dt-bindings:iio:light:st,uvis25: txt to yaml conversion for this UV sensor

For the example, node name is uv-sensor because the standard option
of light-sensor seemed a little too generic for this.

This one could have just been moved to trivial-devices.yaml but for now
I have kept it as a separate doc.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Link: https://lore.kernel.org/r/20201031184854.745828-21-jic23@kernel.org

+42 -22
+42
Documentation/devicetree/bindings/iio/light/st,uvis25.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/iio/light/st,uvis25.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: ST UVIS25 uv sensor 8 + 9 + maintainers: 10 + - Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> 11 + 12 + properties: 13 + compatible: 14 + const: st,uvis25 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + interrupts: 20 + maxItems: 1 21 + 22 + additionalProperties: false 23 + 24 + required: 25 + - compatible 26 + - reg 27 + 28 + examples: 29 + - | 30 + #include <dt-bindings/interrupt-controller/irq.h> 31 + i2c { 32 + #address-cells = <1>; 33 + #size-cells = <0>; 34 + 35 + uv-sensor@47 { 36 + compatible = "st,uvis25"; 37 + reg = <0x47>; 38 + interrupt-parent = <&gpio0>; 39 + interrupts = <0 IRQ_TYPE_EDGE_RISING>; 40 + }; 41 + }; 42 + ...
-22
Documentation/devicetree/bindings/iio/light/uvis25.txt
··· 1 - * ST UVIS25 uv sensor 2 - 3 - Required properties: 4 - - compatible: should be "st,uvis25" 5 - - reg: i2c address of the sensor / spi cs line 6 - 7 - Optional properties: 8 - - interrupts: interrupt mapping for IRQ. It should be configured with 9 - flags IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_LOW or 10 - IRQ_TYPE_EDGE_FALLING. 11 - 12 - Refer to interrupt-controller/interrupts.txt for generic interrupt 13 - client node bindings. 14 - 15 - Example: 16 - 17 - uvis25@47 { 18 - compatible = "st,uvis25"; 19 - reg = <0x47>; 20 - interrupt-parent = <&gpio0>; 21 - interrupts = <0 IRQ_TYPE_EDGE_RISING>; 22 - };