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