treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / Documentation / devicetree / bindings / iio / light / veml6030.yaml
blob0ff9b11f9d1877da91aedfbbc053dcf2ed1bb597
1 # SPDX-License-Identifier: GPL-2.0+
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/iio/light/veml6030.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: VEML6030 Ambient Light Sensor (ALS)
9 maintainers:
10   - Rishi Gupta <gupt21@gmail.com>
12 description: |
13   Bindings for the ambient light sensor veml6030 from Vishay
14   Semiconductors over an i2c interface.
16   Irrespective of whether interrupt is used or not, application
17   can get the ALS and White channel reading from IIO raw interface.
19   If the interrupts are used, application will receive an IIO event
20   whenever configured threshold is crossed.
22   Specifications about the sensor can be found at:
23     https://www.vishay.com/docs/84366/veml6030.pdf
25 properties:
26   compatible:
27     enum:
28       - vishay,veml6030
30   reg:
31     description:
32       I2C address of the device.
33     enum:
34       - 0x10 # ADDR pin pulled down
35       - 0x48 # ADDR pin pulled up
37   interrupts:
38     description:
39       interrupt mapping for IRQ. Configure with IRQ_TYPE_LEVEL_LOW.
40       Refer to interrupt-controller/interrupts.txt for generic
41       interrupt client node bindings.
42     maxItems: 1
44 required:
45   - compatible
46   - reg
48 examples:
49   - |
50     #include <dt-bindings/interrupt-controller/irq.h>
52     i2c {
53         #address-cells = <1>;
54         #size-cells = <0>;
56         light-sensor@10 {
57                 compatible = "vishay,veml6030";
58                 reg = <0x10>;
59                 interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
60         };
61     };
62 ...