Path: blob/master/Documentation/devicetree/bindings/iio/light/upisemi,us5182.yaml
26309 views
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)1%YAML 1.22---3$id: http://devicetree.org/schemas/iio/light/upisemi,us5182.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: UPISEMI us5182d I2C ALS and Proximity sensor78maintainers:9- Jonathan Cameron <jic23@kernel.org>1011properties:12compatible:13const: upisemi,usd51821415reg:16maxItems: 11718upisemi,glass-coef:19$ref: /schemas/types.yaml#/definitions/uint3220description: |21glass attenuation factor - compensation factor of resolution 100022for material transmittance.23default: 10002425upisemi,dark-ths:26$ref: /schemas/types.yaml#/definitions/uint16-array27minItems: 828maxItems: 829description:3016-bit thresholds (adc counts) corresponding to every scale.3132upisemi,upper-dark-gain:33$ref: /schemas/types.yaml#/definitions/uint834description: |358-bit dark gain compensation factor(4 int and 4 fractional bits - Q4.4)36applied when light > threshold.37default: 03839upisemi,lower-dark-gain:40$ref: /schemas/types.yaml#/definitions/uint841description: |428-bit dark gain compensation factor(4 int and 4 fractional bits - Q4.4)43applied when light < threshold.44default: 0x164546upisemi,continuous:47$ref: /schemas/types.yaml#/definitions/flag48description: |49This chip has two power modes: one-shot (chip takes one measurement and50then shuts itself down) and continuous (chip takes continuous51measurements). The one-shot mode is more power-friendly but the52continuous mode may be more reliable. If this property is specified53the continuous mode will be used instead of the default one-shot one for54raw reads.5556additionalProperties: false5758required:59- compatible60- reg6162examples:63- |64i2c {65#address-cells = <1>;66#size-cells = <0>;6768light-sensor@39 {69compatible = "upisemi,usd5182";70reg = <0x39>;71upisemi,glass-coef = < 1000 >;72upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>;73upisemi,upper-dark-gain = /bits/ 8 <0x00>;74upisemi,lower-dark-gain = /bits/ 8 <0x16>;75};76};77...787980