diff mbox series

[2/2] dt-bindings: iio: light: add isl76683 light bindings

Message ID 20210602134512.193186-3-chf.fritz@googlemail.com (mailing list archive)
State Changes Requested
Headers show
Series Support for isl76683 ambient light sensor | expand

Commit Message

Christoph Fritz June 2, 2021, 1:45 p.m. UTC
This patch adds documentation of device tree bindings for Intersil
isl76683 light sensor.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
 .../bindings/iio/light/isil,isl76683.yaml     | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/light/isil,isl76683.yaml

Comments

Jonathan Cameron June 3, 2021, 10:25 a.m. UTC | #1
On Wed,  2 Jun 2021 15:45:12 +0200
Christoph Fritz <chf.fritz@googlemail.com> wrote:

> This patch adds documentation of device tree bindings for Intersil
> isl76683 light sensor.
> 
> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Hi Christoph,

One trivial comment inline. As mentioned in the driver review it might
be nice to relax the requirement for the irq if we can sensibly
do so.  Far too common for people to not wire it up for simple sensors.

Jonathan

> ---
>  .../bindings/iio/light/isil,isl76683.yaml     | 48 +++++++++++++++++++
>  1 file changed, 48 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/light/isil,isl76683.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/light/isil,isl76683.yaml b/Documentation/devicetree/bindings/iio/light/isil,isl76683.yaml
> new file mode 100644
> index 000000000000..3e802a29892b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/isil,isl76683.yaml
> @@ -0,0 +1,48 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/light/isil,isil76683.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Intersil isl76683 ambient light sensor
> +
> +maintainers:
> +  - Christoph Fritz <chf.fritz@googlemail.com>
> +
> +description: |
> +  https://www.intersil.com/content/dam/Intersil/documents/isl7/isl76683.pdf
> +
> +properties:
> +  compatible:
> +    enum:
> +      - isil,isl76683

Unless you are expecting to add new devices sharing this binding, perhaps
       const: isil,isl77683
is more appropriate.

> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        isl76683@74 {
> +            compatible = "isil,isl76683";
> +            reg = <0x74>;
> +            interrupt-parent = <&gpio2>;
> +            interrupts = <20 IRQ_TYPE_FALLING>;
> +        };
> +    };
> +...
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/light/isil,isl76683.yaml b/Documentation/devicetree/bindings/iio/light/isil,isl76683.yaml
new file mode 100644
index 000000000000..3e802a29892b
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/light/isil,isl76683.yaml
@@ -0,0 +1,48 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/light/isil,isil76683.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intersil isl76683 ambient light sensor
+
+maintainers:
+  - Christoph Fritz <chf.fritz@googlemail.com>
+
+description: |
+  https://www.intersil.com/content/dam/Intersil/documents/isl7/isl76683.pdf
+
+properties:
+  compatible:
+    enum:
+      - isil,isl76683
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        isl76683@74 {
+            compatible = "isil,isl76683";
+            reg = <0x74>;
+            interrupt-parent = <&gpio2>;
+            interrupts = <20 IRQ_TYPE_FALLING>;
+        };
+    };
+...