15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 25def4c47SEmmanuel Vadot%YAML 1.2 35def4c47SEmmanuel Vadot--- 45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/light/upisemi,us5182.yaml# 55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65def4c47SEmmanuel Vadot 75def4c47SEmmanuel Vadottitle: UPISEMI us5182d I2C ALS and Proximity sensor 85def4c47SEmmanuel Vadot 95def4c47SEmmanuel Vadotmaintainers: 105def4c47SEmmanuel Vadot - Jonathan Cameron <jic23@kernel.org> 115def4c47SEmmanuel Vadot 125def4c47SEmmanuel Vadotproperties: 135def4c47SEmmanuel Vadot compatible: 14*2eb4d8dcSEmmanuel Vadot const: upisemi,usd5182 155def4c47SEmmanuel Vadot 165def4c47SEmmanuel Vadot reg: 175def4c47SEmmanuel Vadot maxItems: 1 185def4c47SEmmanuel Vadot 19*2eb4d8dcSEmmanuel Vadot upisemi,glass-coef: 205def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 215def4c47SEmmanuel Vadot description: | 225def4c47SEmmanuel Vadot glass attenuation factor - compensation factor of resolution 1000 235def4c47SEmmanuel Vadot for material transmittance. 245def4c47SEmmanuel Vadot default: 1000 255def4c47SEmmanuel Vadot 265def4c47SEmmanuel Vadot upisemi,dark-ths: 275def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint16-array 285def4c47SEmmanuel Vadot minItems: 8 295def4c47SEmmanuel Vadot maxItems: 8 305def4c47SEmmanuel Vadot description: 315def4c47SEmmanuel Vadot 16-bit thresholds (adc counts) corresponding to every scale. 325def4c47SEmmanuel Vadot 335def4c47SEmmanuel Vadot upisemi,upper-dark-gain: 345def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8 355def4c47SEmmanuel Vadot description: | 365def4c47SEmmanuel Vadot 8-bit dark gain compensation factor(4 int and 4 fractional bits - Q4.4) 375def4c47SEmmanuel Vadot applied when light > threshold. 385def4c47SEmmanuel Vadot default: 0 395def4c47SEmmanuel Vadot 405def4c47SEmmanuel Vadot upisemi,lower-dark-gain: 415def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8 425def4c47SEmmanuel Vadot description: | 435def4c47SEmmanuel Vadot 8-bit dark gain compensation factor(4 int and 4 fractional bits - Q4.4) 445def4c47SEmmanuel Vadot applied when light < threshold. 455def4c47SEmmanuel Vadot default: 0x16 465def4c47SEmmanuel Vadot 475def4c47SEmmanuel Vadot upisemi,continuous: 485def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 495def4c47SEmmanuel Vadot description: | 505def4c47SEmmanuel Vadot This chip has two power modes: one-shot (chip takes one measurement and 515def4c47SEmmanuel Vadot then shuts itself down) and continuous (chip takes continuous 525def4c47SEmmanuel Vadot measurements). The one-shot mode is more power-friendly but the 535def4c47SEmmanuel Vadot continuous mode may be more reliable. If this property is specified 545def4c47SEmmanuel Vadot the continuous mode will be used instead of the default one-shot one for 555def4c47SEmmanuel Vadot raw reads. 565def4c47SEmmanuel Vadot 575def4c47SEmmanuel VadotadditionalProperties: false 585def4c47SEmmanuel Vadot 595def4c47SEmmanuel Vadotrequired: 605def4c47SEmmanuel Vadot - compatible 615def4c47SEmmanuel Vadot - reg 625def4c47SEmmanuel Vadot 635def4c47SEmmanuel Vadotexamples: 645def4c47SEmmanuel Vadot - | 655def4c47SEmmanuel Vadot i2c { 665def4c47SEmmanuel Vadot #address-cells = <1>; 675def4c47SEmmanuel Vadot #size-cells = <0>; 685def4c47SEmmanuel Vadot 695def4c47SEmmanuel Vadot light-sensor@39 { 705def4c47SEmmanuel Vadot compatible = "upisemi,usd5182"; 715def4c47SEmmanuel Vadot reg = <0x39>; 725def4c47SEmmanuel Vadot upisemi,glass-coef = < 1000 >; 735def4c47SEmmanuel Vadot upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>; 745def4c47SEmmanuel Vadot upisemi,upper-dark-gain = /bits/ 8 <0x00>; 755def4c47SEmmanuel Vadot upisemi,lower-dark-gain = /bits/ 8 <0x16>; 765def4c47SEmmanuel Vadot }; 775def4c47SEmmanuel Vadot }; 785def4c47SEmmanuel Vadot... 79