Skip to content

Commit 2690be9

Browse files
pmeerwjic23
authored andcommitted
iio: Add Lite-On ltr501 ambient light / proximity sensor driver
combined ambient light (two channels) and proximity sensor with I2C interface; the ALS channels are visible+IR and IR datasheet is here http://optoelectronics.liteon.com/upload/download/DS86-2012-0006/P_100_LTR-501ALS-01_PrelimDS_ver1.1.pdf v3: * fix use of sizeof in _read_als() v2: (thanks to Lars-Peter Clausen) * cannot use devm_iio_device_register() due to cleanup order in _remove() * mutex around data wait/read * turn info message in _probe() into check for part number * change copyright year to 2014 Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 1a5b7d4 commit 2690be9

File tree

3 files changed

+458
-0
lines changed

3 files changed

+458
-0
lines changed

drivers/iio/light/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ config SENSORS_LM3533
9090
changes. The ALS-control output values can be set per zone for the
9191
three current output channels.
9292

93+
config LTR501
94+
tristate "LTR-501ALS-01 light sensor"
95+
depends on I2C
96+
select IIO_BUFFER
97+
select IIO_TRIGGERED_BUFFER
98+
help
99+
If you say yes here you get support for the Lite-On LTR-501ALS-01
100+
ambient light and proximity sensor.
101+
102+
This driver can also be built as a module. If so, the module
103+
will be called ltr501.
104+
93105
config TCS3472
94106
tristate "TAOS TCS3472 color light-to-digital converter"
95107
depends on I2C

drivers/iio/light/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ obj-$(CONFIG_CM36651) += cm36651.o
1010
obj-$(CONFIG_GP2AP020A00F) += gp2ap020a00f.o
1111
obj-$(CONFIG_HID_SENSOR_ALS) += hid-sensor-als.o
1212
obj-$(CONFIG_SENSORS_LM3533) += lm3533-als.o
13+
obj-$(CONFIG_LTR501) += ltr501.o
1314
obj-$(CONFIG_SENSORS_TSL2563) += tsl2563.o
1415
obj-$(CONFIG_TCS3472) += tcs3472.o
1516
obj-$(CONFIG_TSL4531) += tsl4531.o

0 commit comments

Comments
 (0)