Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: iio: light: Document TI OPT4001 light sensor

Add devicetree bindings for opt4001 ambient light sensor.

Signed-off-by: Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230323-add-opt4001-driver-v3-1-62e121dab294@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Stefan Windfeldt-Prytz and committed by
Jonathan Cameron
480abd88 b8ddd022

+68
+68
Documentation/devicetree/bindings/iio/light/ti,opt4001.yaml
··· 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,opt4001.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Texas Instruments OPT4001 Ambient Light Sensor 8 + 9 + maintainers: 10 + - Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com> 11 + 12 + description: 13 + Ambient light sensor with an i2c interface. 14 + Last part of compatible is for the packaging used. 15 + Picostar is a 4 pinned SMT and sot-5x3 is a 8 pinned SOT. 16 + https://www.ti.com/lit/gpn/opt4001 17 + 18 + properties: 19 + compatible: 20 + enum: 21 + - ti,opt4001-picostar 22 + - ti,opt4001-sot-5x3 23 + 24 + reg: 25 + maxItems: 1 26 + 27 + interrupts: 28 + maxItems: 1 29 + 30 + vdd-supply: 31 + description: Regulator that provides power to the sensor 32 + 33 + required: 34 + - compatible 35 + - reg 36 + 37 + allOf: 38 + - if: 39 + properties: 40 + compatible: 41 + contains: 42 + const: ti,opt4001-sot-5x3 43 + then: 44 + properties: 45 + interrupts: 46 + maxItems: 1 47 + else: 48 + properties: 49 + interrupts: false 50 + 51 + additionalProperties: false 52 + 53 + examples: 54 + - | 55 + #include <dt-bindings/interrupt-controller/irq.h> 56 + i2c { 57 + #address-cells = <1>; 58 + #size-cells = <0>; 59 + 60 + light-sensor@44 { 61 + compatible = "ti,opt4001-sot-5x3"; 62 + reg = <0x44>; 63 + vdd-supply = <&vdd_reg>; 64 + interrupt-parent = <&gpio1>; 65 + interrupts = <28 IRQ_TYPE_EDGE_FALLING>; 66 + }; 67 + }; 68 + ...