2012-05-21 20:18:06 +08:00
|
|
|
#
|
|
|
|
# Makefile for IIO Light sensors
|
|
|
|
#
|
|
|
|
|
2013-07-15 15:45:00 +08:00
|
|
|
# When adding new entries keep the list in alphabetical order
|
2015-05-02 20:30:57 +08:00
|
|
|
obj-$(CONFIG_ACPI_ALS) += acpi-als.o
|
2012-07-11 05:32:00 +08:00
|
|
|
obj-$(CONFIG_ADJD_S311) += adjd_s311.o
|
2014-10-09 14:57:00 +08:00
|
|
|
obj-$(CONFIG_AL3320A) += al3320a.o
|
2013-07-22 21:11:00 +08:00
|
|
|
obj-$(CONFIG_APDS9300) += apds9300.o
|
2015-08-18 01:30:16 +08:00
|
|
|
obj-$(CONFIG_APDS9960) += apds9960.o
|
2015-05-04 02:37:21 +08:00
|
|
|
obj-$(CONFIG_BH1750) += bh1750.o
|
2016-04-11 20:12:04 +08:00
|
|
|
obj-$(CONFIG_BH1780) += bh1780.o
|
2013-12-24 09:53:00 +08:00
|
|
|
obj-$(CONFIG_CM32181) += cm32181.o
|
2015-01-16 09:41:04 +08:00
|
|
|
obj-$(CONFIG_CM3232) += cm3232.o
|
2015-03-15 03:11:41 +08:00
|
|
|
obj-$(CONFIG_CM3323) += cm3323.o
|
iio: light: add driver for Capella CM3605
This adds a driver for the Capella Microsystems CM3605 Ambient
Light Sensor and proximity sensor. This is a pretty simple entirely
analog device that is interfaced with the target system using
the POUT (proximity out) and AOUT (ambient light out) signals.
The POUT signal is a simple high/low signal that indicates whether
an object is in proximity, most typically used to detect a face
in front of a mobile device. The signal requires that an infrared
LED is mounted next to the device, making IR light reflect off
the object in proximity and triggering the POUT signal. We grab
a GPIO pin to handle the POUT signal as an interrupt line and
register this as an event channel for the sensor.
Since the proximity sensor requires an IR LED, we add a LED trigger
named "cm3605" so that the infrared LED can just associate with
this trigger to be sure it is always on when the proximity sensor
needs it.
The AOUT is an analog voltage between 0 and 1550 mV that indicate
the LUX value in the ambient light: this is orthogonal to the
proximity sensor functionality. Since this analog voltage needs
to be converted into a digital value, the driver grabs an IIO
channel named "aout" associated with the device.
This patch created a combined ALS and proximity sensor driver.
The former supports raw reads of the LUX value and the latter
will generate proximity events.
To integrate this properly with Linux we also add a supply
regulator for the VDD pin (driving both functions) and add device
tree bindings to define the RSET resistor that in turn configures
the luminosity range of the ALS sensor.
Since the sensor needs to be on more or less constantly, we
restrict the power management to system suspend/resume: we
disable the IR LED and disable the regulator for VDD on suspend
and take them back up on resume.
Tests:
cd /sys/bus/iio/devices/iio:device1
cat in_illuminance_raw
304
(hold hand over sensor)
cat in_illuminance_raw
17
iio_event_monitor cm3605
Found IIO device with name cm3605 with device number 1
(hold hand over sensor)
Event: time: 2444842301447, type: proximity, channel: 0,
evtype: thresh, direction: falling
(remove hand over sensor)
Event: time: 2445583440706, type: proximity, channel: 0,
evtype: thresh, direction: rising
Cc: Capella Microsystems <capellamicro@gmail.com>
Cc: Kevin Tsai <ktsai@capellamicro.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-12-19 05:56:05 +08:00
|
|
|
obj-$(CONFIG_CM3605) += cm3605.o
|
2013-10-17 10:22:00 +08:00
|
|
|
obj-$(CONFIG_CM36651) += cm36651.o
|
2017-01-31 01:07:53 +08:00
|
|
|
obj-$(CONFIG_IIO_CROS_EC_LIGHT_PROX) += cros_ec_light_prox.o
|
2013-09-09 23:23:00 +08:00
|
|
|
obj-$(CONFIG_GP2AP020A00F) += gp2ap020a00f.o
|
2013-07-15 15:45:00 +08:00
|
|
|
obj-$(CONFIG_HID_SENSOR_ALS) += hid-sensor-als.o
|
2014-02-20 14:29:00 +08:00
|
|
|
obj-$(CONFIG_HID_SENSOR_PROX) += hid-sensor-prox.o
|
2016-10-10 15:20:02 +08:00
|
|
|
obj-$(CONFIG_SENSORS_ISL29018) += isl29018.o
|
2017-04-25 09:34:34 +08:00
|
|
|
obj-$(CONFIG_SENSORS_ISL29028) += isl29028.o
|
2014-05-07 20:38:00 +08:00
|
|
|
obj-$(CONFIG_ISL29125) += isl29125.o
|
2014-09-16 11:54:00 +08:00
|
|
|
obj-$(CONFIG_JSA1212) += jsa1212.o
|
2012-05-21 20:18:06 +08:00
|
|
|
obj-$(CONFIG_SENSORS_LM3533) += lm3533-als.o
|
2014-10-02 05:01:00 +08:00
|
|
|
obj-$(CONFIG_LTR501) += ltr501.o
|
2016-04-18 22:31:53 +08:00
|
|
|
obj-$(CONFIG_MAX44000) += max44000.o
|
2015-07-03 06:27:58 +08:00
|
|
|
obj-$(CONFIG_OPT3001) += opt3001.o
|
2015-07-07 19:07:13 +08:00
|
|
|
obj-$(CONFIG_PA12203001) += pa12203001.o
|
2015-06-17 17:42:51 +08:00
|
|
|
obj-$(CONFIG_RPR0521) += rpr0521.o
|
2013-01-12 18:35:00 +08:00
|
|
|
obj-$(CONFIG_SENSORS_TSL2563) += tsl2563.o
|
2016-09-18 22:41:30 +08:00
|
|
|
obj-$(CONFIG_SI1145) += si1145.o
|
2015-04-27 23:34:00 +08:00
|
|
|
obj-$(CONFIG_STK3310) += stk3310.o
|
2014-05-07 20:38:00 +08:00
|
|
|
obj-$(CONFIG_TCS3414) += tcs3414.o
|
2013-09-15 03:38:00 +08:00
|
|
|
obj-$(CONFIG_TCS3472) += tcs3472.o
|
2016-11-13 02:19:41 +08:00
|
|
|
obj-$(CONFIG_TSL2583) += tsl2583.o
|
2013-09-08 23:20:00 +08:00
|
|
|
obj-$(CONFIG_TSL4531) += tsl4531.o
|
2015-09-16 16:14:11 +08:00
|
|
|
obj-$(CONFIG_US5182D) += us5182d.o
|
2012-06-19 15:58:54 +08:00
|
|
|
obj-$(CONFIG_VCNL4000) += vcnl4000.o
|
2016-03-20 23:20:24 +08:00
|
|
|
obj-$(CONFIG_VEML6070) += veml6070.o
|
2017-03-19 22:53:12 +08:00
|
|
|
obj-$(CONFIG_VL6180) += vl6180.o
|