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    const: ti,opt3001
19
20  reg:
21    maxItems: 1
22
23  interrupts:
24    maxItems: 1
25    description: Should be configured with type IRQ_TYPE_EDGE_FALLING
26
27additionalProperties: false
28
29required:
30  - compatible
31  - reg
32
33examples:
34  - |
35    #include <dt-bindings/interrupt-controller/irq.h>
36    i2c {
37        #address-cells = <1>;
38        #size-cells = <0>;
39
40        light-sensor@44 {
41            compatible = "ti,opt3001";
42            reg = <0x44>;
43            interrupt-parent = <&gpio1>;
44            interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
45        };
46    };
47...
48