Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/Documentation/devicetree/bindings/iio/light/ti,opt3001.yaml
26309 views
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
7
title: Texas Instruments OPT3001 Ambient Light Sensor
8
9
maintainers:
10
- Andreas Dannenberg <dannenberg@ti.com>
11
12
description: |
13
The device supports interrupt-driven and interrupt-less operation, depending
14
on whether an interrupt property has been populated into the DT.
15
16
properties:
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
29
additionalProperties: false
30
31
required:
32
- compatible
33
- reg
34
35
examples:
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
51