Path: blob/main/sys/contrib/device-tree/Bindings/iio/light/us5182d.txt
48406 views
* UPISEMI us5182d I2C ALS and Proximity sensor12Required properties:3- compatible: must be "upisemi,usd5182"4- reg: the I2C address of the device56Optional properties:7- upisemi,glass-coef: glass attenuation factor - compensation factor of8resolution 1000 for material transmittance.910- upisemi,dark-ths: array of 8 elements containing 16-bit thresholds (adc11counts) corresponding to every scale.1213- upisemi,upper-dark-gain: 8-bit dark gain compensation factor(4 int and 414fractional bits - Q4.4) applied when light > threshold1516- upisemi,lower-dark-gain: 8-bit dark gain compensation factor(4 int and 417fractional bits - Q4.4) applied when light < threshold1819- upisemi,continuous: This chip has two power modes: one-shot (chip takes one20measurement and then shuts itself down) and continuous (21chip takes continuous measurements). The one-shot mode is22more power-friendly but the continuous mode may be more23reliable. If this property is specified the continuous24mode will be used instead of the default one-shot one for25raw reads.2627If the optional properties are not specified these factors will default to the28values in the below example.29The glass-coef defaults to no compensation for the covering material.30The threshold array defaults to experimental values that work with US5182D31sensor on evaluation board - roughly between 12-32 lux.32There will be no dark-gain compensation by default when ALS > thresh33(0 * dark-gain), and a 1.35 compensation factor when ALS < thresh.3435Example:3637usd5182@39 {38compatible = "upisemi,usd5182";39reg = <0x39>;40upisemi,glass-coef = < 1000 >;41upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>;42upisemi,upper-dark-gain = /bits/ 8 <0x00>;43upisemi,lower-dark-gain = /bits/ 8 <0x16>;44};454647