aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/proximity/Kconfig (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-01-23iio:proximity:sx9360: Add sx9360 supportGwendal Grignou1-0/+14
A simplified version of SX9324, it only have one pin and 2 phases (aka channels). Only one event is presented. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20220101203800.290387-2-gwendal@chromium.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-01-23iio:proximity:sx9324: Add SX9324 supportGwendal Grignou1-0/+14
Semtech SAR sensor SX9324 is an evolution of the SX9310: It has 4 phases that can be configured to capture and process data from any of 3 CS pins and provide independent detection: proximity, table proximity or body proximity. Gather antenna data: echo sx9324-dev3 > trigger/current_trigger echo 1 > scan_elements/in_proximity0_en echo 1 > buffer/enable od -v -An --endian=big -t d2 -w2 /dev/iio\:device3 (at 10Hz, the default). Trigger events: Setting: thresh_falling_period: 2 (events) thresh_rising_period: 2 (events) in_proximity0_thresh_either_value: 300 in_proximity0_thresh_either_hysteresis: 72 using iio_event_monitor /dev/iio\:deviceX, approaching my hand to the antenna pad, I see: ... Event: time: 1634763907532035297, type: proximity, channel: 0, evtype: thresh, direction: falling Event: time: 1634763910138104640, type: proximity, channel: 0, evtype: thresh, direction: rising ... Datasheet: https://edit.wpgdadawant.com/uploads/news_file/program/2019/30184/tech_files/program_30184_suggest_other_file.pdf Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20220101203817.290512-4-gwendal@chromium.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-01-23iio:proximity:sx9310: Extract common Semtech sensor logicGwendal Grignou1-0/+6
Before adding new Semtech sensors, move common logic to all Semtech SAR sensor in its own file: - interface with IIO subsystem, - interrupt management, - channel access conrol, - event processing. The change adds a bidirectional interface between sx93xx and sx_common. The change is quite mechanical, as the impacted functions are moved and renamed. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20220101203817.290512-3-gwendal@chromium.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-03-25iio: proximity: Add a ChromeOS EC MKBP proximity driverStephen Boyd1-0/+11
Add support for a ChromeOS EC proximity driver that exposes a "front" proximity sensor via the IIO subsystem. The EC decides when front proximity is near and sets an MKBP switch 'EC_MKBP_FRONT_PROXIMITY' to notify the kernel of proximity. Similarly, when proximity detects something far away it sets the switch bit to 0. For now this driver exposes a single sensor, but it could be expanded in the future via more MKBP bits if desired. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Benson Leung <bleung@chromium.org> Cc: Guenter Roeck <groeck@chromium.org> Cc: Douglas Anderson <dianders@chromium.org> Cc: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Link: https://lore.kernel.org/r/20210211024601.1963379-4-swboyd@chromium.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-05-21iio: proximity: Add driver support for vcnl3020 proximity sensorIvan Mikhaylov1-0/+11
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>
2020-03-21iio: Add SEMTECH SX9310/9311 sensor driverDaniel Campello1-0/+13
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>
2019-12-01iio: ping: add parallax ping sensorsAndreas Klinger1-0/+15
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>
2019-08-25Kconfig: Fix the reference to the RFD77402 ToF sensor in the 'help' sectionChristophe JAILLET1-1/+1
This should be RFD77402, not RFD77420. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner1-0/+1
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>
2019-04-14Kconfig: change configuration of srf04 ultrasonic iio sensorAndreas Klinger1-2/+9
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>
2019-04-04mb1232.c: add distance iio sensor with i2cAndreas Klinger1-0/+12
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>
2018-09-22iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor.Song Qiang1-0/+11
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>
2018-07-23iio: light: isl29501: Add support for the ISL29501 ToF sensor.Mathieu Othacehe1-0/+13
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>
2018-02-04iio: srf08: fix link error "devm_iio_triggered_buffer_setup" undefinedAndreas Klinger1-0/+2
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: a83195937151 ("iio: srf08: add triggered buffer support") Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-14iio: proximity: Add rfd77402 driverPeter Meerwald-Stadler1-0/+10
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>
2017-08-18iio: srf08: add support for srf02 in i2c modeAndreas Klinger1-4/+4
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>
2017-08-18iio: srf08: add sensor type srf10Andreas Klinger1-2/+2
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>
2017-02-04iio: distance: add devantech us ranger srf04Andreas Klinger1-0/+11
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>
2017-01-28iio: distance: srf08: add IIO driver for us rangerAndreas Klinger1-1/+12
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>
2015-08-31iio: proximity: add support for PulsedLight LIDARMatt Ranostay1-0/+12
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>
2015-01-05iio: driver for Semtech SX9500 proximity solutionVlad Dogaru1-0/+17
Supports buffering, IIO events and changing sampling frequency. Datasheet available at: http://www.semtech.com/images/datasheet/sx9500_ag.pdf Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-03-16iio: Add AS3935 lightning sensor supportMatt Ranostay1-0/+19
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>