• Matti Vaittinen's avatar
    iio: light: ROHM BU27034 Ambient Light Sensor · e52afbd6
    Matti Vaittinen authored
    ROHM BU27034 is an ambient light sensor with 3 channels and 3 photo diodes
    capable of detecting a very wide range of illuminance. Typical application
    is adjusting LCD and backlight power of TVs and mobile phones.
    
    Add initial  support for the ROHM BU27034 ambient light sensor.
    
    NOTE:
    	- Driver exposes 4 channels. One IIO_LIGHT channel providing the
    	  calculated lux values based on measured data from diodes #0 and
    	  #1. In addition, 3 IIO_INTENSITY channels are emitting the raw
    	  register data from all diodes for more intense user-space
    	  computations.
    	- Sensor has GAIN values that can be adjusted from 1x to 4096x.
    	- Sensor has adjustible measurement times of 5, 55, 100, 200 and
    	  400 mS. Driver does not support 5 mS which has special
    	  limitations.
    	- Driver exposes standard 'scale' adjustment which is
    	  implemented by:
    		1) Trying to adjust only the GAIN
    		2) If GAIN adjustment alone can't provide requested
    		   scale, adjusting both the time and the gain is
    		   attempted.
    	- Driver exposes writable INT_TIME property that can be used
    	  for adjusting the measurement time. Time adjustment will also
    	  cause the driver to try to adjust the GAIN so that the
    	  overall scale is kept as close to the original as possible.
    Signed-off-by: default avatarMatti Vaittinen <mazziesaccount@gmail.com>
    Link: https://lore.kernel.org/r/2a7efb6f335da5526fbe34b95137c5e45db5c5d3.1680263956.git.mazziesaccount@gmail.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    e52afbd6
rohm-bu27034.c 38.6 KB