0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/light/ti,opt3001.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Texas Instruments OPT3001 Ambient Light Sensor
0008
0009 maintainers:
0010 - Andreas Dannenberg <dannenberg@ti.com>
0011
0012 description: |
0013 The device supports interrupt-driven and interrupt-less operation, depending
0014 on whether an interrupt property has been populated into the DT.
0015
0016 properties:
0017 compatible:
0018 const: ti,opt3001
0019
0020 reg:
0021 maxItems: 1
0022
0023 interrupts:
0024 maxItems: 1
0025 description: Should be configured with type IRQ_TYPE_EDGE_FALLING
0026
0027 additionalProperties: false
0028
0029 required:
0030 - compatible
0031 - reg
0032
0033 examples:
0034 - |
0035 #include <dt-bindings/interrupt-controller/irq.h>
0036 i2c {
0037 #address-cells = <1>;
0038 #size-cells = <0>;
0039
0040 light-sensor@44 {
0041 compatible = "ti,opt3001";
0042 reg = <0x44>;
0043 interrupt-parent = <&gpio1>;
0044 interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
0045 };
0046 };
0047 ...