xref: /linux/Documentation/devicetree/bindings/iio/light/rohm,bh1745.yaml (revision 06a130e42a5bfc84795464bff023bff4c16f58c5)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/light/rohm,bh1745.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: ROHM BH1745 colour sensor
8
9maintainers:
10  - Mudit Sharma <muditsharma.info@gmail.com>
11
12description:
13  BH1745 is an I2C colour sensor with red, green, blue and clear
14  channels. It has a programmable active low interrupt pin.
15  Interrupt occurs when the signal from the selected interrupt
16  source channel crosses set interrupt threshold high/low level.
17
18properties:
19  compatible:
20    const: rohm,bh1745
21
22  reg:
23    maxItems: 1
24
25  interrupts:
26    maxItems: 1
27
28  vdd-supply: true
29
30required:
31  - compatible
32  - reg
33  - vdd-supply
34
35additionalProperties: false
36
37examples:
38  - |
39    #include <dt-bindings/interrupt-controller/irq.h>
40    i2c {
41        #address-cells = <1>;
42        #size-cells = <0>;
43
44        colour-sensor@38 {
45            compatible = "rohm,bh1745";
46            reg = <0x38>;
47            interrupt-parent = <&gpio>;
48            interrupts = <19 IRQ_TYPE_LEVEL_LOW>;
49            vdd-supply = <&vdd>;
50        };
51    };
52
53...
54