xref: /linux/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml (revision 2eff01ee2881becc9daaa0d53477ec202136b1f4)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/light/ti,opt3001.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Texas Instruments OPT3001 Ambient Light Sensor
8
9maintainers:
10  - Andreas Dannenberg <dannenberg@ti.com>
11
12description: |
13  The device supports interrupt-driven and interrupt-less operation, depending
14  on whether an interrupt property has been populated into the DT.
15
16properties:
17  compatible:
18    enum:
19      - ti,opt3001
20      - ti,opt3002
21
22  reg:
23    maxItems: 1
24
25  interrupts:
26    maxItems: 1
27    description: Should be configured with type IRQ_TYPE_EDGE_FALLING
28
29additionalProperties: false
30
31required:
32  - compatible
33  - reg
34
35examples:
36  - |
37    #include <dt-bindings/interrupt-controller/irq.h>
38    i2c {
39        #address-cells = <1>;
40        #size-cells = <0>;
41
42        light-sensor@44 {
43            compatible = "ti,opt3001";
44            reg = <0x44>;
45            interrupt-parent = <&gpio1>;
46            interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
47        };
48    };
49...
50