Texas Instruments OPT4001 Ambient Light Sensor

Schema identifier ($id): "http://devicetree.org/schemas/iio/light/ti,opt4001.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>"

Ambient light sensor with an i2c interface. Last part of compatible is for the packaging used. Picostar is a 4 pinned SMT and sot-5x3 is a 8 pinned SOT. https://www.ti.com/lit/gpn/opt4001

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "ti,opt4001-picostar", "ti,opt4001-sot-5x3"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — not listed as required here #

Maximum number of items (maxItems): 1

vdd-supply — not listed as required here #

Regulator that provides power to the sensor

Required in this object (required): "compatible", "reg"

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "ti,opt4001-sot-5x3"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Maximum number of items (maxItems): 1

When the condition does not match (else) #

Properties and child nodes (properties)

interrupts — not listed as required here

false — Not permitted by this property rule.

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/irq.h>
i2c {
    #address-cells = <1>;
    #size-cells = <0>;

    light-sensor@44 {
        compatible = "ti,opt4001-sot-5x3";
        reg = <0x44>;
        vdd-supply = <&vdd_reg>;
        interrupt-parent = <&gpio1>;
        interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

Edit this page