Commit 94042874 authored by Rhyland Klein's avatar Rhyland Klein Committed by Greg Kroah-Hartman

staging: iio: light: Adding driver for ISL29018 ALS

adding support for the ISL 29018 ambient light and proximity sensor.

Addressed comments from reviews by Jonathan Cameron and Joe Perches
  * Removed some excess dbg prints that only printed function name
  * Renamed some properties to make them more descriptive
  * Added a property to list available adc resolutions
  * Defined arrays for resolutions/ranges as static const
  * Change loops initialization to memset for extensibility.
    * used sizeof() instead of ARRAY_SIZE() to be safer
  * Added a property to list available adc ranges
  * Fixed warnings and property names.
Signed-off-by: default avatarRhyland Klein <rklein@nvidia.com>
Acked-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1e3950b8
What: /sys/bus/iio/devices/device[n]/range
KernelVersion: 2.6.37
Contact: linux-iio@vger.kernel.org
Description:
Hardware dependent ADC Full Scale Range used for some ambient
light sensors in calculating lux.
What: /sys/bus/iio/devices/device[n]/range_available
KernelVersion: 2.6.37
Contact: linux-iio@vger.kernel.org
Description:
Hardware dependent supported vales for ADC Full Scale Range.
What: /sys/bus/iio/devices/device[n]/adc_resolution
KernelVersion: 2.6.37
Contact: linux-iio@vger.kernel.org
Description:
Hardware dependent ADC resolution of the ambient light sensor
used in calculating the lux.
What: /sys/bus/iio/devices/device[n]/adc_resolution_available
KernelVersion: 2.6.37
Contact: linux-iio@vger.kernel.org
Description:
Hardware dependent list of possible values supported for the
adc_resolution of the given sensor.
What: /sys/bus/iio/devices/device[n]/illuminance0[_input|_raw]
KernelVersion: 2.6.35
Contact: linux-iio@vger.kernel.org
Description:
This should return the calculated lux from the light sensor. If
it comes back in SI units, it should also include _input else it
should include _raw to signify it is not in SI units.
What: /sys/.../device[n]/proximity_on_chip_ambient_infrared_supression
KernelVersion: 2.6.37
Contact: linux-iio@vger.kernel.org
Description:
Hardware dependent mode for an ALS device to calculate the value
in proximity mode. When this is enabled, then the device should
use a infrared sensor reading to remove infrared noise from the
proximity reading. If this is not enabled, the driver can still
do this calculation manually by reading the infrared sensor
value and doing the negation in sw.
What: /sys/bus/iio/devices/device[n]/proximity[_input|_raw]
KernelVersion: 2.6.37
Contact: linux-iio@vger.kernel.org
Description:
This property is supported by proximity sensors and should be
used to return the value of a reading by the sensor. If this
value is returned in SI units, it should also include _input
but if it is not, then it should include _raw.
What: /sys/bus/iio/devices/device[n]/intensity_infrared[_input|_raw]
KernelVersion: 2.6.37
Contact: linux-iio@vger.kernel.org
Description:
This property is supported by sensors that have an infrared
sensing mode. This value should be the output from a reading
and if expressed in SI units, should include _input. If this
value is not in SI units, then it should include _raw.
......@@ -12,3 +12,15 @@ config SENSORS_TSL2563
This driver can also be built as a module. If so, the module
will be called tsl2563.
config SENSORS_ISL29018
tristate "ISL 29018 light and proximity sensor"
depends on I2C
default n
help
If you say yes here you get support for ambient light sensing and
proximity infrared sensing from Intersil ISL29018.
This driver will provide the measurements of ambient light intensity
in lux, proximity infrared sensing and normal infrared sensing.
Data from sensor is accessible via sysfs.
......@@ -3,3 +3,4 @@
#
obj-$(CONFIG_SENSORS_TSL2563) += tsl2563.o
obj-$(CONFIG_SENSORS_ISL29018) += isl29018.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