Commit 03eff7b6 authored by Oleksandr Kravchenko's avatar Oleksandr Kravchenko Committed by Jonathan Cameron

iio: add APDS9300 ambilent light sensor driver

This patch adds IIO driver for APDS9300 ambient light sensor (ALS).
http://www.avagotech.com/docs/AV02-1077EN

The driver allows to read raw data from ADC registers or calculate
lux value. It also can handle threshold interrupt.
Signed-off-by: default avatarOleksandr Kravchenko <o.v.kravchenko@globallogic.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent e6faed19
* Avago APDS9300 ambient light sensor
http://www.avagotech.com/docs/AV02-1077EN
Required properties:
- compatible : should be "avago,apds9300"
- reg : the I2C address of the sensor
Optional properties:
- interrupt-parent : should be the phandle for the interrupt controller
- interrupts : interrupt mapping for GPIO IRQ
Example:
apds9300@39 {
compatible = "avago,apds9300";
reg = <0x39>;
interrupt-parent = <&gpio2>;
interrupts = <29 8>;
};
......@@ -17,6 +17,16 @@ config ADJD_S311
This driver can also be built as a module. If so, the module
will be called adjd_s311.
config APDS9300
tristate "APDS9300 ambient light sensor"
depends on I2C
help
Say Y here if you want to build a driver for the Avago APDS9300
ambient light sensor.
To compile this driver as a module, choose M here: the
module will be called apds9300.
config HID_SENSOR_ALS
depends on HID_SENSOR_HUB
select IIO_BUFFER
......
......@@ -4,6 +4,7 @@
# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_ADJD_S311) += adjd_s311.o
obj-$(CONFIG_APDS9300) += apds9300.o
obj-$(CONFIG_HID_SENSOR_ALS) += hid-sensor-als.o
obj-$(CONFIG_SENSORS_LM3533) += lm3533-als.o
obj-$(CONFIG_SENSORS_TSL2563) += tsl2563.o
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment