iio: light: Add support for TI OPT4001 light sensor
authorStefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>
Wed, 26 Apr 2023 11:57:30 +0000 (13:57 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 13 May 2023 16:56:06 +0000 (17:56 +0100)
commit9a9608418292bb8733805c3f3123dfe0454fadac
tree090308a34cbd515a8aa4125d512946f2ae66e07c
parent480abd88c04a56f1817985f6854333a5ea2d26fa
iio: light: Add support for TI OPT4001 light sensor

This driver uses the continuous mode of the chip and integration
time can be configured through sysfs.
The constants for calculating lux value differs between packaging
so it uses different compatible string for the two versions
"ti,opt4001-picostar" and "ti,opt4001-sot-5x3" since the device id
is the same.

Datasheet: https://www.ti.com/lit/gpn/opt4001
Signed-off-by: Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>
Link: https://lore.kernel.org/r/20230323-add-opt4001-driver-v3-2-62e121dab294@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/Kconfig
drivers/iio/light/Makefile
drivers/iio/light/opt4001.c [new file with mode: 0644]