From 52a04bfbc9f29e42c6a539bfadb27e888f7bfcdc Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 31 Oct 2020 18:48:28 +0000 Subject: [PATCH] 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 Reviewed-by: Rob Herring Cc: Lorenzo Bianconi Link: https://lore.kernel.org/r/20201031184854.745828-21-jic23@kernel.org --- .../devicetree/bindings/iio/light/st,uvis25.yaml | 42 ++++++++++++++++++++++ .../devicetree/bindings/iio/light/uvis25.txt | 22 ------------ 2 files changed, 42 insertions(+), 22 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/light/st,uvis25.yaml delete mode 100644 Documentation/devicetree/bindings/iio/light/uvis25.txt diff --git a/Documentation/devicetree/bindings/iio/light/st,uvis25.yaml b/Documentation/devicetree/bindings/iio/light/st,uvis25.yaml new file mode 100644 index 0000000..c86e5e1d --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/st,uvis25.yaml @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/light/st,uvis25.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ST UVIS25 uv sensor + +maintainers: + - Lorenzo Bianconi + +properties: + compatible: + const: st,uvis25 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + uv-sensor@47 { + compatible = "st,uvis25"; + reg = <0x47>; + interrupt-parent = <&gpio0>; + interrupts = <0 IRQ_TYPE_EDGE_RISING>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/light/uvis25.txt b/Documentation/devicetree/bindings/iio/light/uvis25.txt deleted file mode 100644 index 043c139..0000000 --- a/Documentation/devicetree/bindings/iio/light/uvis25.txt +++ /dev/null @@ -1,22 +0,0 @@ -* ST UVIS25 uv sensor - -Required properties: -- compatible: should be "st,uvis25" -- reg: i2c address of the sensor / spi cs line - -Optional properties: -- 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: - -uvis25@47 { - compatible = "st,uvis25"; - reg = <0x47>; - interrupt-parent = <&gpio0>; - interrupts = <0 IRQ_TYPE_EDGE_RISING>; -}; -- 2.7.4