79 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/light/upisemi,us5182.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: UPISEMI us5182d I2C ALS and Proximity sensor8 9maintainers:10 - Jonathan Cameron <jic23@kernel.org>11 12properties:13 compatible:14 const: upisemi,usd518215 16 reg:17 maxItems: 118 19 upisemi,glass-coef:20 $ref: /schemas/types.yaml#/definitions/uint3221 description: |22 glass attenuation factor - compensation factor of resolution 100023 for material transmittance.24 default: 100025 26 upisemi,dark-ths:27 $ref: /schemas/types.yaml#/definitions/uint16-array28 minItems: 829 maxItems: 830 description:31 16-bit thresholds (adc counts) corresponding to every scale.32 33 upisemi,upper-dark-gain:34 $ref: /schemas/types.yaml#/definitions/uint835 description: |36 8-bit dark gain compensation factor(4 int and 4 fractional bits - Q4.4)37 applied when light > threshold.38 default: 039 40 upisemi,lower-dark-gain:41 $ref: /schemas/types.yaml#/definitions/uint842 description: |43 8-bit dark gain compensation factor(4 int and 4 fractional bits - Q4.4)44 applied when light < threshold.45 default: 0x1646 47 upisemi,continuous:48 $ref: /schemas/types.yaml#/definitions/flag49 description: |50 This chip has two power modes: one-shot (chip takes one measurement and51 then shuts itself down) and continuous (chip takes continuous52 measurements). The one-shot mode is more power-friendly but the53 continuous mode may be more reliable. If this property is specified54 the continuous mode will be used instead of the default one-shot one for55 raw reads.56 57additionalProperties: false58 59required:60 - compatible61 - reg62 63examples:64 - |65 i2c {66 #address-cells = <1>;67 #size-cells = <0>;68 69 light-sensor@39 {70 compatible = "upisemi,usd5182";71 reg = <0x39>;72 upisemi,glass-coef = < 1000 >;73 upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>;74 upisemi,upper-dark-gain = /bits/ 8 <0x00>;75 upisemi,lower-dark-gain = /bits/ 8 <0x16>;76 };77 };78...79