OSDN Git Service

iio: light: ROHM BU27034 Ambient Light Sensor
authorMatti Vaittinen <mazziesaccount@gmail.com>
Fri, 31 Mar 2023 12:41:58 +0000 (15:41 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 10 Apr 2023 11:26:35 +0000 (12:26 +0100)
commite52afbd61039e2c5a4e611e23b4aa963d34a4aef
treef2a459653826e965ca4c561d4e0d2bf5bd565e0a
parent0dca5c9730dcfcf9ba05362e5e36b1ea0c85066d
iio: light: ROHM BU27034 Ambient Light Sensor

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: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/2a7efb6f335da5526fbe34b95137c5e45db5c5d3.1680263956.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/Kconfig
drivers/iio/light/Makefile
drivers/iio/light/rohm-bu27034.c [new file with mode: 0644]