Proximity sensor driver based on light/vcnl4000.c code.
For now supports only the single on-demand measurement.
The VCNL3020 is a fully integrated proximity sensor. Fully
integrated means that the infrared emitter is included in the
package. It has 16-bit resolution. It includes a signal
processing IC and features standard I2C communication
interface. It features an interrupt function.
Datasheet: http://www.vishay.com/docs/84150/vcnl3020.pdf
Signed-off-by: Ivan Mikhaylov <i.mikhaylov@yadro.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Add SEMTECH SX9310/9311 driver.
The device has the following entry points:
Usual frequency:
- sampling_frequency
- sampling_frequency_available
Instant reading of current values for different sensors:
- in_proximity0_raw
- in_proximity1_raw
- in_proximity2_raw
- in_proximity3_comb_raw
and associated events in events/
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Enrico Granata <egranata@chromium.org>
Signed-off-by: Daniel Campello <campello@chromium.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Add support for parallax ping and laser ping sensors with just one pin
for trigger and echo signal.
This driver is based on srf04. In contrast to it it's necessary to
change direction of the pin and to request the irq just for the period
when the echo is rising and falling. Because this adds a lot of cases
there is this individual driver for handling this type of sensors.
Add a new configuration variable CONFIG_PING to Kconfig and Makefile.
Julia reported an issue with failing to unlock a mutex in some error
paths.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This should be RFD77402, not RFD77420.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:
GPL-2.0-only
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
reword configuration option for SRF04
list supported types in help text
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Add I2CXL-MaxSonar ultrasonic distance sensors of types mb1202, mb1212,
mb1222, mb1232, mb1242, mb7040, mb7137 using an i2c interface
Implemented functionality:
- reading the distance via in_distance_raw
- buffered mode with trigger
- make use of interrupt to announce completion of ranging
Add mb1232 driver to Kconfig and Makefile
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This driver was originally written by ST in 2016 as a misc input device
driver, and hasn't been maintained for a long time. I grabbed some code
from it's API and reformed it into an iio proximity device driver.
This version of driver uses i2c bus to talk to the sensor and
polling for measuring completes, so no irq line is needed.
It can be tested with reading from
/sys/bus/iio/devices/iio:deviceX/in_distance_input
Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This patch adds support for the ISL29501 Time of Flight sensor.
Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Functions for triggered buffer support are needed by this module.
If they are not defined accidentally by another driver, there's an error
thrown out while linking.
Add a select of IIO_BUFFER and IIO_TRIGGERED_BUFFER in the Kconfig file.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Fixes: a831959371 ("iio: srf08: add triggered buffer support")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Driver for RF Digital RFD77402 VCSEL (vertical-cavity surface-emitting
laser) Time-of-Flight (ToF) sensor to measure distance up to 2 m with
millimeter precision
Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
srf02 added with support for i2c interface
Attributes for setting max range or sensitivity are omitted for the case of
srf02 type sensor, because they are not supported by the hardware.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Ultrasonic sensor srf10 is quite similar to srf08 and now also supported by
the driver as device tree compatible string.
It was necessary to prepare the source for supplementary sensors. This is
done by enum srf08_sensor_type.
The most significiant difference between srf08 and srf10 is another range
and values of register gain (in the driver it's call sensitivity).
Therefore the array of it is extended and dependent of the sensor type.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This patch adds support for the ultrasonic ranger srf04 of devantech.
This device is measuring the distance of objects in a range between 1 cm
and 3 meters and a theoretical resolution of 3 mm.
There are two GPIOs used:
- trigger: set as output to the device when the measurement should start
- echo: set by the device when the ultrasonic wave is sent out and reset
when the echo is recognized; this needs to be an interrupt input
The time between setting and resetting the echo pin is the time the
waveform needed for one round trip. This time is recorded in the interrupt
handler.
The distance is calculated in the read function by using the ultrasonic
speed at 20 degrees celsius which is about 343 m/s.
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This is the IIO driver for devantech srf08 ultrasonic ranger which can be
used to measure the distances to an object.
The sensor supports I2C with some registers.
Supported Features include:
- read the distance in ranging mode in centimeters
- output of the driver is directly the read value
- together with the scale the driver delivers the distance in meters
- only the first echo of the nearest object is delivered
- set sensitivity as analog value in the range of 0-31 means setting
gain register on device
- set range registers; userspace enters max. range in millimeters in
43 mm steps
Features not supported by this driver:
- ranging mode in inches or in microseconds
- ANN mode
- change I2C address through this driver
- light sensor
The driver was added in the directory "proximity" of the iio subsystem and
the menu in den config is now called "Proximity and distance sensors"
Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Add support for the PulsedLight LIDAR rangefinder sensor which allows
high speed (over 300Hz) distance measurements using Barker Coding within
40 meter range.
Support only tested on the "blue label" rev 2, but may work using low
sample frequencies on the original version.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
AS3935 chipset can detect lightning strikes and reports those back as
events and the estimated distance to the storm.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>