UPISEMI us5182d I2C ALS and Proximity sensor

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

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

Maintainers (maintainers): "Jonathan Cameron <jic23@kernel.org>"

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "upisemi,usd5182"

reg — required here #

Maximum number of items (maxItems): 1

upisemi,glass-coef — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

glass attenuation factor - compensation factor of resolution 1000 for material transmittance.

Default value (default): 1000

upisemi,dark-ths — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint16-array

Minimum number of items (minItems): 8

Maximum number of items (maxItems): 8

16-bit thresholds (adc counts) corresponding to every scale.

upisemi,upper-dark-gain — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8

8-bit dark gain compensation factor(4 int and 4 fractional bits - Q4.4) applied when light > threshold.

Default value (default): 0

upisemi,lower-dark-gain — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint8

8-bit dark gain compensation factor(4 int and 4 fractional bits - Q4.4) applied when light < threshold.

Default value (default): 22

upisemi,continuous — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

This chip has two power modes: one-shot (chip takes one measurement and then shuts itself down) and continuous (chip takes continuous measurements). The one-shot mode is more power-friendly but the continuous mode may be more reliable. If this property is specified the continuous mode will be used instead of the default one-shot one for raw reads.

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

false

Not allowed by this rule.

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

Examples (examples) #

i2c {
    #address-cells = <1>;
    #size-cells = <0>;

    light-sensor@39 {
        compatible = "upisemi,usd5182";
        reg = <0x39>;
        upisemi,glass-coef = < 1000 >;
        upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>;
        upisemi,upper-dark-gain = /bits/ 8 <0x00>;
        upisemi,lower-dark-gain = /bits/ 8 <0x16>;
    };
};

Source notes #

Annotations retained from the schema source

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

Edit this page