1* UPISEMI us5182d I2C ALS and Proximity sensor 2 3Required properties: 4- compatible: must be "upisemi,usd5182" 5- reg: the I2C address of the device 6 7Optional properties: 8- upisemi,glass-coef: glass attenuation factor - compensation factor of 9 resolution 1000 for material transmittance. 10 11- upisemi,dark-ths: array of 8 elements containing 16-bit thresholds (adc 12 counts) corresponding to every scale. 13 14- upisemi,upper-dark-gain: 8-bit dark gain compensation factor(4 int and 4 15 fractional bits - Q4.4) applied when light > threshold 16 17- upisemi,lower-dark-gain: 8-bit dark gain compensation factor(4 int and 4 18 fractional bits - Q4.4) applied when light < threshold 19 20- upisemi,continuous: This chip has two power modes: one-shot (chip takes one 21 measurement and then shuts itself down) and continuous ( 22 chip takes continuous measurements). The one-shot mode is 23 more power-friendly but the continuous mode may be more 24 reliable. If this property is specified the continuous 25 mode will be used instead of the default one-shot one for 26 raw reads. 27 28If the optional properties are not specified these factors will default to the 29values in the below example. 30The glass-coef defaults to no compensation for the covering material. 31The threshold array defaults to experimental values that work with US5182D 32sensor on evaluation board - roughly between 12-32 lux. 33There will be no dark-gain compensation by default when ALS > thresh 34(0 * dark-gain), and a 1.35 compensation factor when ALS < thresh. 35 36Example: 37 38 usd5182@39 { 39 compatible = "upisemi,usd5182"; 40 reg = <0x39>; 41 upisemi,glass-coef = < 1000 >; 42 upisemi,dark-ths = /bits/ 16 <170 200 512 512 800 2000 4000 8000>; 43 upisemi,upper-dark-gain = /bits/ 8 <0x00>; 44 upisemi,lower-dark-gain = /bits/ 8 <0x16>; 45 }; 46