aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/light/Makefile (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-08-15iio: light: Add support for ltrf216a sensorShreeya Patel1-0/+1
Add initial support for ltrf216a ambient light sensor. Datasheet: https://gitlab.collabora.com/shreeya/iio/-/blob/master/LTRF216A.pdf Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Co-developed-by: Zhigang Shi <Zhigang.Shi@liteon.com> Signed-off-by: Zhigang Shi <Zhigang.Shi@liteon.com> Co-developed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Shreeya Patel <shreeya.patel@collabora.com> Link: https://lore.kernel.org/r/20220725104050.491396-3-shreeya.patel@collabora.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2021-05-17iio: light: Added AMS tsl2591 driver implementationJoe Sandom1-0/+1
Driver implementation for AMS/TAOS tsl2591 ambient light sensor. This driver supports configuration via device tree and sysfs. Supported channels for raw infrared light intensity, raw combined light intensity and illuminance in lux. The driver additionally supports iio events on lower and upper thresholds. This is a very-high sensitivity light-to-digital converter that transforms light intensity into a digital signal. Datasheet: https://ams.com/tsl25911#tab/documents Signed-off-by: Joe Sandom <joe.g.sandom@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210421221330.17007-1-joe.g.sandom@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-03iio: light: as73211: New driverChristian Eggers1-0/+1
Support for AMS AS73211 JENCOLOR(R) Digital XYZ Sensor. This driver has no built-in trigger. In order for making triggered measurements, an external (software) trigger driver like iio-trig-hrtimer or iio-trig-sysfs is required. The sensor supports single and continuous measurement modes. The latter is not used by design as this would require tight timing synchronization between hardware and driver without much benefit. Datasheet: https://ams.com/documents/20143/36005/AS73211_DS000556_3-01.pdf Signed-off-by: Christian Eggers <ceggers@arri.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-04-07Merge tag 'mfd-next-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfdLinus Torvalds1-0/+1
Pull mfd updates from Lee Jones: "New Drivers: - Add support for IQS620A/621/622/624/625 Azoteq IQS62X Sensors New Device Support: - Add support for ADC, IRQ, Regulator, RTC and WDT to Ricoh RN5T618 PMIC - Add support for Comet Lake to Intel LPSS New Functionality: - Add support for Charger Detection to Spreadtrum SC27xx PMICs - Add support for Interrupt Polarity to Dialog Semi DA9062/61 PMIC - Add ACPI enumeration support to Diolan DLN2 USB Adaptor Fix-ups: - Device Tree; iqs62x, rn5t618, cros_ec_dev, stm32-lptimer, rohm,bd71837, rohm,bd71847 - I2C registration; rn5t618 - Kconfig; MFD_CPCAP, AB8500_CORE, MFD_WM8994, MFD_WM97xx, MFD_STPMIC1 - Use flexible-array members; omap-usb-tll, qcom-pm8xxx - Remove unnecessary casts; omap-usb-host, omap-usb-tll - Power (suspend/resume/poweroff) enhancements; rk808 - Improve error/sanity checking; dln2 - Use snprintf(); aat2870-core Bug Fixes: - Fix PCI IDs in intel-lpss-pci" * tag 'mfd-next-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (33 commits) mfd: intel-lpss: Fix Intel Elkhart Lake LPSS I2C input clock mfd: aat2870: Use scnprintf() for avoiding potential buffer overflow mfd: dln2: Allow to be enumerated via ACPI mfd: da9062: Add support for interrupt polarity defined in device tree dt-bindings: bd718x7: Yamlify and add BD71850 mfd: dln2: Fix sanity checking for endpoints mfd: intel-lpss: Add Intel Comet Lake PCH-V PCI IDs mfd: sc27xx: Add USB charger type detection support dt-bindings: mfd: Document STM32 low power timer bindings mfd: rk808: Convert RK805 to shutdown/suspend hooks mfd: rk808: Reduce shutdown duplication mfd: rk808: Stop using syscore ops mfd: rk808: Ensure suspend/resume hooks always work mfd: rk808: Always use poweroff when requested mfd: omap: Remove useless cast for driver.name mfd: Kconfig: Fix some misspelling of the word functionality mfd: pm8xxx: Replace zero-length array with flexible-array member mfd: omap-usb-tll: Replace zero-length array with flexible-array member mfd: cpcap: Fix compile if MFD_CORE is not selected mfd: cros_ec: Check DT node for usbpd-notify add ...
2020-03-27iio: light: Add support for Azoteq IQS621/622 ambient light sensorsJeff LaBundy1-0/+1
This patch adds support for the Azoteq IQS621 and IQS622 ambient light sensors, both of which can report a four-bit representation of ambient light intensity. The IQS621 can additionally report illuminace directly in units of lux, while the IQS622 can report a four-bit representation of infrared light intensity. Furthermore, the IQS622 can report a unitless measurement of a target's proximity to the device. Signed-off-by: Jeff LaBundy <jeff@labundy.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2020-03-08iio: light: add Dyna-Image AL3010 driverDavid Heidelberg1-0/+1
Based on: - 3320A in-kernel driver - https://www.spinics.net/lists/linux-iio/msg25145.html - https://lore.kernel.org/patchwork/patch/684179/ I decided to keep it aside of AL3320A due to different approach and much simpler design of 3010. Tested on Nexus 7 2012 (grouper/tilapia). Tested-by: David Heidelberg <david@ixit.cz> Tested-by: Dmitry Osipenko <digetx@gmail.com> Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: David Heidelberg <david@ixit.cz> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-02-14iio: light: Add a driver for Sharp GP2AP002x00FLinus Walleij1-0/+1
This driver handles two different Sharp sensors that have been proposed for merging to the mainline kernel over the years, and already has a limited proximity-only driver in the input subsystem. These components are completely different from the confusingly similarly named Sharp GP2AP020A00F, for which we have a driver in drivers/iio/light/gp2ap020a00f.c The two components GP2AP002A00F and GP2AP002S00F are distinctively different but similar: they share the same set of registers but differ slightly in the I2C protocol. Instead of the approach by the previous input driver, we create a combined IIO proximity and light sensor driver. The plan is to merge this driver and delete the input driver. The pieces for the driver are picked all over the place after researching and grepping through a few different vendor trees and driver submissions. We merge it under the light sensors because: - It has similarities with the Capella CM3605 light sensor and proximity driver which is there. - It is related to the GP2AP020A00F driver which is also there. This driver was tested with the Samsung GT-S7710 mobile phone which has the GP2AP002S00F proximity sensor mounted. The suspend/resume cycle will disable the interrupt from the sensor. If someone would desire to use this interrupt for wakeup, the driver will need modifications. Cc: Stephan Gerhold <stephan@gerhold.net> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com> Cc: Jonathan Bakker <xc-racer2@live.ca> Cc: Oskar Andero <oskar.andero@gmail.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Tested-by: Jonathan Bakker <xc-racer2@live.ca> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-11-10iio: light: add driver for veml6030 ambient light sensorRishi Gupta1-0/+1
veml6030 is an ambient light sensor from Vishay semiconductors. It has 16-bit resolution, supports both ambient light measurement and white channel which is more responsive to wider wavelength spectrum. It has flexible power saving, integration time and gain options. Communication with host is over I2C. Signed-off-by: Rishi Gupta <gupt21@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-15iio: light: Add support for ADUX1020 sensorManivannan Sadhasivam1-0/+1
Add initial support for Analog Devices ADUX1020 Photometric sensor. Only proximity mode has been enabled for now. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-05iio: light: noa1305: Add support for NOA1305Martyn Welch1-0/+1
This driver adds the initial support for the ON Semiconductor NOA1305 Ambient Light Sensor. Originally written by Sergei Miroshnichenko. Found here: https://github.com/EmcraftSystems/linux-upstream/commit/196d6cf897e632d2cb82d45484bd7a1bfdd5b6d9 Signed-off-by: Sergei M <fizik1@yandex.com> Signed-off-by: Martyn Welch <martyn.welch@collabora.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-02-02iio: light: add driver for MAX44009Robert Eshleman1-0/+1
The MAX44009 is a low-power ambient light sensor from Maxim Integrated. It differs from the MAX44000 in that it doesn't have proximity sensing and that it requires far less current (1 micro-amp vs 5 micro-amps). The register mapping and feature set between the two are different enough to require a new driver for the MAX44009. Developed and tested with a BeagleBone Black and UDOO Neo (i.MX6SX) Supported features: * Reading lux (processed value) * Rising and falling illuminance threshold events * Configuring integration time https://datasheets.maximintegrated.com/en/ds/MAX44009.pdf Signed-off-by: Robert Eshleman <bobbyeshleman@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-16iio: light: Add support for vishay vcnl4035Parthiban Nallathambi1-0/+1
Add support for VCNL4035, which is capable of Ambient light sensing (ALS) and proximity function. This patch adds support only for ALS function Signed-off-by: Parthiban Nallathambi <pn@denx.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-23iio: light: introduce si1133Maxime Roussin-Bélanger1-0/+1
e-mail received from Silicon Lab to confirm that the licensing isn't a problem. " Dear Maxime Roussin-Belanger, The LUX calculation code only works with Si1133. As long as the software is used with Silicon Lab's sensor product, I don't see any problem. Regards, Tony " Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> Reviewed-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-05-12staging: iio: tsl2x7x/tsl2772: move out of stagingBrian Masney1-0/+1
Move the tsl2772 driver out of staging and into mainline. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-03-03iio: light: lv0104cs: Add support for LV0104CS light sensorJeff LaBundy1-0/+1
This patch adds support for the On Semiconductor LV0104CS ambient light sensor. Signed-off-by: Jeff LaBundy <jeff@labundy.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-12-02iio: light: add support for UVIS25 sensorLorenzo Bianconi1-0/+3
add support for STMicroelectronics UVIS25 uv sensor http://www.st.com/resource/en/datasheet/uvis25.pdf - continuos mode support - i2c support - spi support - trigger mode support - system PM support Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-12-02iio: light: Add driver for IDT ZOPT2201 ambient light and UVB sensorPeter Meerwald-Stadler1-0/+1
Driver for 20-bit ALS and UV B sensor with I2C interface exposing the following API: in_uvindex_input in_illuminance_raw in_illuminance_scale in_illuminance_scale_available in_intensity_uv_raw in_intensity_uv_scale in_intensity_uv_scale_available integration_time integration_time_available Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman1-0/+1
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-26staging: iio: isl29028: move out of stagingBrian Masney1-0/+1
Move ISL29028 ALS / Proximity Sensor out of staging and into mainline. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-03-25iio:light: Add support for STMicro VL6180 sensorManivannan Sadhasivam1-0/+1
This patch adds support for STMicro VL6180 - ALS, range and proximity sensor. Sensor is capable of measuring the light intensity as well as object distance using TOF (Time of Flight) technology. Signed-off-by: Manivannan Sadhasivam <manivannanece23@gmail.com> Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2017-02-04iio: cros_ec_light_prox: add ChromeOS EC Light and Proximity SensorsGwendal Grignou1-0/+1
Handle Light and Proximity sensors presented by the ChromeOS EC Sensor hub. Creates an IIO device for each functions. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-12-30iio: light: add driver for Capella CM3605Linus Walleij1-0/+1
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-11-13staging: iio: tsl2583: move out of stagingBrian Masney1-0/+1
Move tsl2580, tsl2581, tsl2583 driver out of staging into mainline. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-10-23staging: iio: isl29018: move out of stagingBrian Masney1-0/+1
Move ISL29018/ISL29023/ISL29035 driver out of staging into mainline. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-09-18iio: light: Add driver for Silabs si1132, si1141/2/3 and si1145/6/7 ambient light, uv index and proximity sensorsPeter Meerwald-Stadler1-0/+1
The si114x supports x=1,2,3 IR LEDs for proximity sensing together with visible and IR ambient light sensing (ALS). Newer parts (si1132, si1145/6/7) can measure UV light and compute an UV index This was tested on si1143 and si1145 Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-04-24max44000: Initial supportCrestez Dan Leonard1-0/+1
This just adds support for reporting illuminance with default settings. Important default registers are written on probe because the device otherwise lacks a reset function. Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-04-19iio: Add Vishay VEML6070 UV A light sensor driverPeter Meerwald-Stadler1-0/+1
ultraviolet (UV) light sensor with I2C interface with a peak sensitivity at 355 nm strangely, chip uses two addresses 0x38 and 0x39 for LSB and MSB data, resp. datasheet: http://www.vishay.com/docs/84277/veml6070.pdf Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-04-16iio: light: new driver for the ROHM BH1780Linus Walleij1-0/+1
This is a reimplementation of the old misc device driver for the ROHM BH1780 ambient light sensor (drivers/misc/bh1780gli.c). Differences from the old driver: - Uses the IIO framework - Uses runtime PM to idle the hardware after 5 seconds - No weird custom power management from userspace - No homebrewn values in sysfs This uses the same (undocumented) device tree compatible-string as the old driver ("rohm,bh1780gli"). Cc: Arnd Bergmann <arnd@arndb.de> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Daniel Mack <daniel@caiaq.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-09-23iio: light: Add support for UPISEMI uS5182d als and proximity sensorAdriana Reus1-0/+1
Add support for UPISEMI us5182d als and proximity sensor. Supports raw readings. Data sheet for this device can be found here: http://www.upi-semi.com/temp/uS5182D-DS-P0103-temp.pdf Signed-off-by: Adriana Reus <adriana.reus@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-08-31iio: light: add APDS9960 ALS + promixity driverMatt Ranostay1-0/+1
APDS9960 is a combination of ALS, proximity, and gesture sensors. This patch adds support for these functions along with gain control, integration time, and event thresholds. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-07-20iio: light: Add support for TXC PA12 als and proximity sensorAdriana Reus1-0/+1
Add support for TXC PA12203001 als and proximity sensor. Support for raw illuminance and proximity readings. Signed-off-by: Adriana Reus <adriana.reus@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-07-20iio: light: add support for TI's opt3001 light sensorAndreas Dannenberg1-0/+1
TI's opt3001 light sensor is a simple and yet powerful little device. The device provides 99% IR rejection, automatic full-scale, very low power consumption and measurements from 0.01 to 83k lux. This patch adds support for that device using the IIO framework. See http://www.ti.com/product/opt3001 for more information. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-06-21iio: light: Add support for ROHM RPR0521 sensorDaniel Baluta1-0/+1
This patch adds support for ROHM RPR0521 ambient light and proximity sensor. It offers raw readings for intensity and proximity. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-10iio: acpi: Add support for ACPI0008 Ambient Light SensorGabriele Mazzotta1-0/+1
This driver adds the initial support for the ACPI Ambient Light Sensor as defined in Section 9.2 of the ACPI specification (Revision 5.0) [1]. Sensors complying with the standard are exposed as ACPI devices with ACPI0008 as hardware ID and provide standard methods by which the OS can query properties of the ambient light environment the system is currently operating in. This driver currently allows only to get the current ambient light illuminance reading through the _ALI method, but is ready to be extended extended to handle _ALC, _ALT and _ALP as well. [1] http://www.acpi.info/DOWNLOADS/ACPIspec50.pdf Signed-off-by: Martin Liska <marxin.liska@gmail.com> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Cc: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-10iio: light: add support for ROHM BH1710/BH1715/BH1721/BH1750/BH1751 ambient light sensorsTomasz Duszynski1-0/+1
Add support for ROHM BH1710/BH1715/BH1721/BH1750/BH1751 ambient light sensors. Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-05-10iio: light: Add support for Sensortek STK3310Tiberiu Breana1-0/+1
Minimal implementation of an IIO driver for the Sensortek STK3310 ambient light and proximity sensor. The STK3311 model is also supported. Includes: - ACPI support; - read_raw and write_raw; - reading and setting configuration parameters for gain/scale and integration time for both ALS and PS. - power management Signed-off-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-03-15iio: light: Add support for Capella CM3323 color sensorDaniel Baluta1-0/+1
Minimal implementation providing raw light intensity and integration time attribute. Userspace applications can use GREEN channel for raw illuminance readings following this table: Integration Time | G Sensitivity ================================ 40 ms | 0.18 80 ms | 0.09 160 ms | 0.045 320 ms | 0.0225 640 ms | 0.01125 1280 ms | 0.005625 Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-01-27iio: Added Capella cm3232 ambient light sensor driver.Kevin Tsai1-0/+1
CM3232 is an advanced ambient light sensor with I2C protocol interface. The I2C slave address is internally hardwired as 0x10 (7-bit). Writing to configure register is byte mode, but reading ALS register requests to use word mode for 16-bit resolution. Signed-off-by: Kevin Tsai <ktsai@capellamicro.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-11-08iio: jsa1212: Add JSA1212 proximity/ALS sensorKuppuswamy Sathyanarayanan1-0/+1
This patch adds a new driver for solteam opto JSA1212 proximity and ambient light sensor. Basic details of the chip can be found here. http://www.solteamopto.com.tw/detail.php?ms=3&po_unit=2&pt_unit=29&p_unit=120 Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-09-10iio: Add Dyna-Image AL3320A ambient light sensor driverDaniel Baluta1-0/+1
Minimal implementation. This driver provides raw illuminance readings. This is based on drivers/hwmon/al3320.c (*) driver from msm tree written by Tsechih Lin <Tsechih_Lin@asus.com> * https://android.googlesource.com/kernel/msm.git Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-07-07iio: Add driver for AMS/TAOS tcs3414 digital color sensorPeter Meerwald1-0/+1
16-bit digital color sensor with red, green, blue and clear channel datasheet: http://ams.com/eng/content/download/250258/975997/TCS3414_Datasheet_EN_v1.pdf Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-07-07iio: Add Intersil isl29125 digital color light sensor driverPeter Meerwald1-0/+1
datasheet: http://www.intersil.com/content/dam/Intersil/documents/isl2/isl29125.pdf Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-02-22iio: hid-sensors: Added Proximity Sensor DriverArchana Patni1-0/+1
Added usage id processing for Proximity (Human Presence). This uses IIO interfaces for triggered buffer to present data to user mode. This uses HID sensor framework for registering callback events from the sensor hub. Signed-off-by: Archana Patni <archana.patni@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-12iio: Add Lite-On ltr501 ambient light / proximity sensor driverPeter Meerwald1-0/+1
combined ambient light (two channels) and proximity sensor with I2C interface; the ALS channels are visible+IR and IR datasheet is here http://optoelectronics.liteon.com/upload/download/DS86-2012-0006/P_100_LTR-501ALS-01_PrelimDS_ver1.1.pdf v3: * fix use of sizeof in _read_als() v2: (thanks to Lars-Peter Clausen) * cannot use devm_iio_device_register() due to cleanup order in _remove() * mutex around data wait/read * turn info message in _probe() into check for part number * change copyright year to 2014 Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-01-01iio: add Capella CM32181 ambient light sensor driver.Kevin Tsai1-0/+1
Add Capella Microsystem CM32181 Ambient Light Sensor IIO driver. This driver will convert raw data to lux value under open-air condition. Change the calibscale based on the cover material. Signed-off-by: Kevin Tsai <ktsai@capellamicro.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-10-17iio: cm36651: Add CM36651 proximity/light sensorBeomho Seo1-0/+1
This patch adds a new driver for Capella CM36651 proximity and RGB sensor. Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-15iio: gp2ap020a00f: Add a driver for the deviceJacek Anaszewski1-0/+1
Add a new driver for the ambient light/proximity sensor device. The driver exposes three channels: light_clear light_ir and proximity. It also supports triggered buffer, high and low ambient light threshold event and proximity detection events. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-14iio: Add tcs3472 color light sensor driverPeter Meerwald1-0/+1
chip has four 16-bit channels for red, green, blue, clear color intensity; driver supports the TCS3x7x family of devices and was tested with a TCS34725 chip; further information here: http://www.ams.com/eng/Products/Light-Sensors/Color-Sensor/TCS34725 v2 (thanks to Jonathan Cameron): * drop dynamic buffer allocation, buffer is in tcs3472_data * limit sysfs output to PAGE_SIZE * check val2 == 0 when writing CALIBSCALE Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: Jon Brenner <jon.brenner@ams.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-09-14iio: Add tsl4531 ambient light sensor driverPeter Meerwald1-0/+1
driver for the TSL4531 family of 16-bit I2C ambient light sensors; information is here: http://www.ams.com/eng/Products/Light-Sensors/Ambient-Light-Sensor-ALS/TSL45315 the chip offers simple lux output v3 (thanks Lars-Peter Clausen): * add mutex to when updating integration time * fix chip ID checking * code cleanups v2: * rename to tsl4351 * use INT_TIME Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-08-03iio: add APDS9300 ambilent light sensor driverOleksandr Kravchenko1-0/+1
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: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>