aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-04-22iio: imx7d_adc: Use devm_iio_device_register()Andrey Smirnov
Use devm_iio_device_register() and drop imx7d_adc_remove(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Cc: Chris Healy <cphealy@gmail.com> Cc: linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22iio: imx7d_adc: Simplify imx7d_adc_remove() with imx7d_adc_suspend()Andrey Smirnov
Since imx7d_adc_remove() does exactly the same thing as imx7d_adc_suspend() we can use the latter together with devm_add_action_or_reset() to simplify the former. Rename imx7d_adc_suspend() to imx7d_adc_disable() for clarity while at it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Cc: Chris Healy <cphealy@gmail.com> Cc: linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22iio: imx7d_adc: Simplify imx7d_adc_probe() with imx7d_adc_resume()Andrey Smirnov
Initialization sequence performed in imx7d_adc_resume() is exactly the same as the one being done in imx7d_adc_probe(). Make use of the former in the latter to avoid code duplication. Rename imx7d_adc_resume() to imx7d_adc_enable() for clarity while at it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Cc: Chris Healy <cphealy@gmail.com> Cc: linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22drivers/iio/gyro/mpu3050-core.c: This patch fix the following checkpatch ↵Mohan Kumar
warning. As per Documentation/timers/timers-howto.txt Msleep < 20ms can sleep for up to 20ms. so use usleep_range. Signed-off-by: Mohan Kumar <mohankumar718@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22iio: dac: ad5758: Modifications for new revisionMircea Caprioru
This patch will ensure compatibility with the new revision of the AD5758 dac converter. The modifications consist of removing the fault_prot_switch function since this option is no longer available, and enabling the ENABLE_PPC_BUFFERS bit in ADC_CONFIG register before setting the PPC current mode. The previous version of the chip was never released to customers so there is no need to support it going forwards. Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22iio: imu: st_lsm6dsx: inline per-sensor dataLorenzo Bianconi
As it has been already done for other st sensors in 'commit 9049531c91b4 ("iio: accel: st_accel: inline per-sensor data")', get rid of some defines and just open code the values into the appropriate struct elements since the semantic meaning is inherent in the name of the C99-addressable fields and there is no reason to duplicate the code Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22iio: adc: Add driver for the TI ADS8344 A/DC chipsGregory CLEMENT
This adds support for the Texas Instruments ADS8344 ADC chip. This chip has a 16-bit 8-Channel ADC and is access directly through SPI. Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22dt-bindings: iio: adc: Add bindings for TI ADS8344 A/DC chipsGregory CLEMENT
This adds device tree bindings for the TI ADS8344 A/DC chips. Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22MAINTAINERS: add entry for fxas21002c gyro driverRui Miguel Silva
Add me as maintainer of the nxp fxas21002c gyroscope driver. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22iio: gyro: fxas21002c: add spi driverRui Miguel Silva
Add driver to talk over spi to a fxas21002c gyroscope device and use the core as main controller. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22iio: gyro: fxas21002c: add i2c driverRui Miguel Silva
Add the real driver to talk over i2c and use the fxas21002c core for the main tasks. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-22iio: gyro: add core driver for fxas21002cRui Miguel Silva
Add core support for the NXP fxas21002c Tri-axis gyroscope, using the iio subsystem. It supports PM operations, axis reading, temperature, scale factor of the axis, high pass and low pass filtering, and sampling frequency selection. It will have extras modules to support the communication over i2c and spi. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14iio: gyro: add DT bindings to fxas21002cRui Miguel Silva
Add device tree bindings for the FXAS21002C gyroscope. Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14Kconfig: change configuration of srf04 ultrasonic iio sensorAndreas Klinger
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-14dt-bindings: iio: srf04: add Maxbotix ultrasonic iio proximity sensorsAndreas Klinger
add compatibles for Maxbotix ultrasonic iio sensor types to yaml documentation Signed-off-by: Andreas Klinger <ak@it-klinger.de> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14srf04.c: add maxbotix ultrasonic sensorsAndreas Klinger
add Maxbotix LV ultrasonic sensor types mb1000, mb1010, mb1020, mb1030 and mb1040 add a configuration struct with the different trigger pulse lengths Signed-off-by: Andreas Klinger <ak@it-klinger.de> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14iio: adc: ti-ads7950: Fix build error without CONFIG_GPIOLIBYueHaibing
When building with CONFIG_GPIOLIB is not set gcc warns this: drivers/iio/adc/ti-ads7950.c:75:19: error: field chip has incomplete type struct gpio_chip chip; ^~~~ drivers/iio/adc/ti-ads7950.c: In function ti_ads7950_set: drivers/iio/adc/ti-ads7950.c:409:32: error: implicit declaration of function gpiochip_get_data; did you mean acpi_get_data? [-Werror=implicit-function-declaration] struct ti_ads7950_state *st = gpiochip_get_data(chip); ^~~~~~~~~~~~~~~~~ acpi_get_data Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: c97dce792dc8 ("iio: adc: ti-ads7950: add GPIO support") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Justin Chen <justinpopo6@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14iio: temperature: max31856: fix uninitialized error returnColin Ian King
Currently if mask is neither CHAN_INFO_RAW or CHAN_INFO_SCALE then then an uninitialized error return 'ret' is returned. Fix this by adding a default case that ensures -EINVAL is returned for this specific case. Addresses-Coverity: ("Uninitialized scalar variable") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14iio: imu: st_lsm6dsx: remove set but not used variables 'acc_sensor' and ↵YueHaibing
'gyro_sensor' Fixes gcc '-Wunused-but-set-variable' warning: drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c: In function 'st_lsm6dsx_read_tagged_fifo': drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c:520:41: warning: variable 'gyro_sensor' set but not used [-Wunused-but-set-variable] drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c:520:28: warning: variable 'acc_sensor' set but not used [-Wunused-but-set-variable] They are not used since commit 14c7c6e1a860 ("iio: imu: st_lsm6dsx: add st_lsm6dsx_push_tagged_data routine") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14iio: accel: add support to LIS2DE12Robert Jones
Add support to STMicroelectronics LIS2DE12 accelerometer in st_accel framework. http://www.st.com/resource/en/datasheet/lis2de12.pdf Signed-off-by: Robert Jones <rjones@gateworks.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14dt-bindings: iio: accel: add LIS2DE12 sensor device bindingRobert Jones
Signed-off-by: Robert Jones <rjones@gateworks.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14iio: accel: kxcjk1013: Add KIOX0008 ACPI Hardware-IDValentin Manea
Add the ACPI ID for KXCJ9 sensor seen on the a Teclast X80 Power tablet. Signed-off-by: Valentin Manea <linux-iio@mrs.ro> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14staging: iio: ad9832: use clock framework for clock referenceMarcelo Schmitt
Previously external clock were set through platform_data struct. Now device uses clk struct defined in include/linux/clk.h to handle external clock source. It also removes mclk from platform_data struct. Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14staging: iio: ad9832: organize includesMarcelo Schmitt
Organize includes to list them in lexicographic order. Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14bmp085.yaml: transform DT documentation of iio sensor into YAMLAndreas Klinger
use bmp085.txt and change it into yaml format fix links to datasheets in replaced documentation Signed-off-by: Andreas Klinger <ak@it-klinger.de> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14avia-hx711.yaml: transform DT binding to YAMLAndreas Klinger
replace avia-hx711.txt by avia-hx711.yaml as yaml devicetree documentation for avia hx711 iio adc sensor Signed-off-by: Andreas Klinger <ak@it-klinger.de> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14iio: imx7d_adc: Use devm_platform_ioremap_resource()Andrey Smirnov
Use devm_platform_ioremap_resource() to be able to drop a bit of explicit boilerplate code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Cc: Chris Healy <cphealy@gmail.com> Cc: linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14iio: imx7d_adc: Replace pr_err with dev_errAndrey Smirnov
Replace combination of pr_err()/dev_name() with an equivalent call for dev_err(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Cc: Chris Healy <cphealy@gmail.com> Cc: linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14iio: imx7d_adc: Add local struct device pointer in imx7d_adc_probe()Andrey Smirnov
Use a local "struct device *dev" in imx7d_adc_probe() for brevity. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net> Cc: Chris Healy <cphealy@gmail.com> Cc: linux-iio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14dt-bindings: iio: adc: Add AD7616 ADC documentationBeniamin Bia
Document support for AD7616 Analog to Digital Converter. Signed-off-by: Beniamin Bia <beniamin.bia@analog.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14iio: adc: ad7616: Add support for AD7616 ADCBeniamin Bia
The AD7616 is a 12-bit ADC with 16 channels. The AD7616 can be configured to work in hardware mode by controlling it via gpio pins and read data via spi. No support for software mode yet, but it is a work in progress. This device requires a reset in order to update oversampling, so chip info has got a new attribute to mark this. The current assumption that this driver makes for AD7616, is that it's working in Hardware Mode with Serial, Burst and Sequencer modes activated. To activate them, following pins must be pulled high: -SER/PAR -SEQEN And following must be pulled low: -WR/BURST -DB4/SEQEN Datasheets: Link: https://www.analog.com/media/en/technical-documentation/data-sheets/ad7616.pdf Signed-off-by: Beniamin Bia <beniamin.bia@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14iio: adc: ad7606: Move oversampling options in chip info and rework *_avail ↵Stefan Popa
attributes Available oversampling ratios and scales can be shown by calling a common ad7606_show_avail function which takes as parameters the array which stores the values, together with the size of the array. Oversampling options are now defined in chip info structure and they are loaded at probe. Has_Oversampling attribute was removed because oversampling_num was added and it is not needed anymore. The purpose of this patch is to deal with the scale_avail and oversampling_avail arrays in a generic way. This makes it easier to add support for new devices which will work with different scales and oversampling ratios. It is also an intermediate step for adding support for ad7616 which has different oversampling sampling ratios available. Signed-off-by: Stefan Popa <stefan.popa@analog.com> Signed-off-by: Beniamin Bia <beniamin.bia@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14staging: iio: frequency: ad9834: Remove unnecessary parenthesesMelissa Wen
Remove unneeded parentheses around the arguments of ||. This reduces clutter and code behave in the same way. Change suggested by checkpatch.pl. CHECK: Unnecessary parentheses around 'st->devid == ID_AD9833' CHECK: Unnecessary parentheses around 'st->devid == ID_AD9837' Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14iio: adc: Fix MAX9611 spacingFabrizio Castro
Between "config" and "MAX9611" there is a tab, replace it with a space. Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-14dt-bindings: iio: imu: st_lsm6dsx: add lsm6dsr device bindingsLorenzo Bianconi
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-07iio: imu: st_lsm6dsx: add support to LSM6DSRLorenzo Bianconi
Add support to STM LSM6DSR 6-axis (acc + gyro) Mems sensor https://www.st.com/resource/en/datasheet/lsm6dsr.pdf Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04Merge tag 'iio-for-5.2a-2' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of new device support, features and fixes for IIO in the 5.2 cycle Staging graduations * ad7780 - Move this ADC driver out of staging. Included adding some new features along the way (see below). Also added DT bindings. New device support * adis16480 - Support the ADIS16495 and ADIS16497 IMU devices making heavy use of refactoring of various aspects of the driver in precursor patches. * lsm6dsx - Support for the ASM330LHH 6-axis (accelerometer + gyro) sensor. - Support for the LSM6DS0X * matbotix mb1232 - New driver for this ultrasound ranging device family. Including bindings. - Supports mb1202, mb1212, mb1222, mb1232, mb1242, mb7040 and mb7137. * max31856 - New driver for this thermocouple temperature sensor. * meson saradc - Support the Meson-G12A (ID addition only). * stmpe-adc - New driver supporting generic ADC alongside touchscreen support which previously existed. Includes DT bindings. * vcnl4000 - Support for the vcln4040 proximity and light sensor, including adding DT bindings for this and parts previously supported. Features * core - Allow reading of mount matrices from ACPI in addition to DT. - Common binding for theromcouple types. * ad5933 - Add ABI docs as there are a few 'unsual' elements about this device - perhaps because it's our only impedance analyser. * ad7780 - Add gain and filter gpio support + readback of current gain and filter. * adis16480 - Allow selection fo the dataready pin to be used. - Device tree ID table and binding documentation. - Support external clock modes, including new bindings. * bma180 - Mount matrix support. * bmc150 - Mount matrix support. * bmg160 - Mount matrix support. - DT id table and bindings doc. * bmp280 - Put calibration data into the entropy pool. * hmc5843 - Mount matrix support. * itg3200 - Mount matrix support. * kxcjk1013 - Device tree id table, and binding docs. * lpc32xx - Add scale when regulator specified including DT docs for regulator. * pms7003 - Add device IDs for all supported parts to driver and binding. * stm32-dfsdm - Enable hw consumer support, scan mode control and a complex set of triggered buffer modes. - Power management. * stm32-lptimer-counter - power management. - Document the pinctrl sleep state binding. * ti-ads7950 - GPIO pin support. Cleanups, minor fixes * core - Use bitmap_zalloc to make it explicit that is what we are doing. - Tidy up all the Kconfig files (which had slowly gotten messy) - Fix a forwards definition missing issue in iio/driver.h * ad sigma delta core - Improve handling of SPI bus locking vs CS assertion. This has been wrong a long time so not rushing this in. * ad5064 - Mlock to local lock. * ad5933 (staging cleanup) - Multiline comment fixes. - Include ordering. - SPDX. - Tidy up Kconfig help which was a bit missleading. - Change some non standard attributes to ABI defined ones. * ad7124 - White space fix. * ad7192 - White space. - Use DT clock binding. - Improve error reporting. - Platform data to DT conversion. - Use read_avail callback, mostly to avoid the endless series of patches from new contributors trying to falsely put spaces around the negative sign. * ad7280a - Add brackets to macros to avoid potential precedence isseus. - Add temp vars for event codes to reduce indent and improved readability. - Clean out som CamelCase notation. - White space. * ad7606 - Fix broken file naming in MAINTAINERS. * ad7780 - Missing switch defaults to supress warnings and harden the code slightly. - Set pattern masks more directly. - Add ID values and masks for all supported chips. - SPDX + add Renato as a copyright holder as he has done a lot of work on this driver. - Add brackets to macros to avoid potential precedence issues. * ad7923 - White space fixes. - Use BIT macro to improve readability. - Add brackets to macros to avoid potential precedence issues. - Tidy up a null comparisom. * ad9523 - Fix a typo in naming of variables. * adis16400 - Combine trigger file into main code as no advantage in separate files. Rename core file to just adis16400. - Squash the header into the c file now there is only one file. - Generalize burst mode to support new variants. * ak8975 - Local variable to improve readability around mount matrix support. * as3935 - Avoid potential race by ensuring remove does exact opposite of probe rather than a slightly different order. * cross_ec - Drop some unnecessary includes. - Fix some warning and the slightly 'unusual' code. - Add some docs for non obvious function. - SPDX * hmc5843 - Potential unhandled error case. * iio trigger core - Print an error if there is no available irq due to max consumers per trigger being set to low. * iio loop trigger - Drop an unlikely on IS_ERR as IS_ERR already has the annotation. * ingenic-adc - Drop a redundant dev_err call as devm_ioremap_resource reports the same internally. * lmp91000 - Drop some unncessary parentheses and white space tidy up. - Invert and if statement to improve readability. - Fix a wrong error message. * lpc32xx - Header sorting + drop some unused ones. * mma8542 - Mark a switch fallthrough. * mpu6050 - Add a local variable to improve code readability around mount matrix support. * mxs-lradc-adc - Handle devm_iio_trigger_alloc failure. * sps30 - Fix up a kernel version in the ABI docs. * srf04 - DT binding doc converted to yaml. * ssp_sensors - Supress a clang build warning due to lack of visibility of conditional within a iio_push_to_buffers_with_timestamp. (reasonable false warning!) * st_accel - Drop pointless less than 0 comparisom of unsigned int. * stm32-dfsdm - Improve accuracy of spi_master_frequency calculation. - Improve calculation fo sampling frequency. - Rework various internals to simplify adding triggered buffer support. - Claim direct mode to avoid racing around read_raw and being in buffered mode. * stmpe - Fix a clang false positive warning. * ti-ads7950 - Use local lock rather than using the core mlock when not locking around the device mode. * vcnl4000 - Use word writes instead of byte writes. It seems byte writes are fine for some parts (undocument) but not others that the driver will shortly support. Other * mailmap - Add email address change for Sean Nyekjaer. Update in relevant drivers * tag 'iio-for-5.2a-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (129 commits) iio: ad_sigma_delta: Properly handle SPI bus locking vs CS assertion iio: adc: stm32-dfsdm: add PM support iio: adc: stm32-dfsdm: improve sampling frequency accuracy staging: iio: adc: ad7280a: Tab alignment MAINTAINERS: Fix the link to ad7606 dt-bindings iio:temperature: Add MAX31856 thermocouple support iio:temperature:max31856:Add device tree bind info dt-bindings: iio/temperature: Add thermocouple types (and doc) devantech-srf04.yaml: transform DT binding to YAML iio: frequency: ad9523: Fix typo in ad9523_platform_data iio: Make possible to include driver.h first dt-bindings: iio: add Bosch BMG160 gyroscope sensor iio: gyro: bmg160: add device tree compatibility table staging: iio: adc: ad7192: Use read_avail for available attributes dt-bindings: iio: light: add vcnl4040 devicetree bindings iio: light: vcnl4000 add support for the VCNL4040 proximity and light sensor dt-bindings: iio: light: add vcnl4000 devicetree bindings iio: light: vcnl4000 add devicetree hooks iio: light: vcnl4000 use word writes instead of byte writes iio: adc: stm32-dfsdm: claim direct mode for raw read and settings ...
2019-04-04iio: ad_sigma_delta: Properly handle SPI bus locking vs CS assertionLars-Peter Clausen
For devices from the SigmaDelta family we need to keep CS low when doing a conversion, since the device will use the MISO line as a interrupt to indicate that the conversion is complete. This is why the driver locks the SPI bus and when the SPI bus is locked keeps as long as a conversion is going on. The current implementation gets one small detail wrong though. CS is only de-asserted after the SPI bus is unlocked. This means it is possible for a different SPI device on the same bus to send a message which would be wrongfully be addressed to the SigmaDelta device as well. Make sure that the last SPI transfer that is done while holding the SPI bus lock de-asserts the CS signal. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Alexandru Ardelean <Alexandru.Ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04iio: adc: stm32-dfsdm: add PM supportFabrice Gasnier
Add PM and runtime PM support to STM32 DFSDM drivers: - stm32-dfsdm-core: manage clocks. - stm32-dfsdm-adc: restore channels configuration upon resume. Also stop restart everything in case of buffer mode. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04iio: adc: stm32-dfsdm: improve sampling frequency accuracyFabrice Gasnier
The sample frequency is driven using the oversampling ratio depending on the SPI bus frequency. Currently, oversampling ratio is computed by an entire division: - spi_freq / sample_freq. This may result in inaccurate value. Using DIV_ROUND_CLOSEST improves resulting sample frequency, which is useful for audio that requests fixed rates (such as: 8, 16 or 32 kHz). BTW, introduce new routine to re-factor sample frequency setting, and move frequency accuracy message from warning to debug level. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: adc: ad7280a: Tab alignmentCristian Sicilia
Aligned some parameters. Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04MAINTAINERS: Fix the link to ad7606 dt-bindingsStefan Popa
The devicetree bindings documentation for ad7606 should also include the vendor prefix: ad7606.txt -> adi,ad7606.txt Fixes: 6e33a125df66 ("dt-bindings: iio: adc: Add docs for AD7606 ADC") Signed-off-by: Stefan Popa <stefan.popa@analog.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04iio:temperature: Add MAX31856 thermocouple supportParesh Chaudhary
This patch adds support for Maxim MAX31856 thermocouple temperature sensor support. More information can be found in: https://www.maximintegrated.com/en/ds/MAX31856.pdf NOTE: Driver support only Comparator Mode. Signed-off-by: Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com> Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04iio:temperature:max31856:Add device tree bind infoParesh Chaudhary
This patch added device tree binding info for MAX31856 driver. Signed-off-by: Paresh Chaudhary <paresh.chaudhary@rockwellcollins.com> Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04dt-bindings: iio/temperature: Add thermocouple types (and doc)Patrick Havelange
This patch introduces common thermocouple types used by various temperature sensors. Also a brief documentation explaining this "thermocouple-type" property. Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04devantech-srf04.yaml: transform DT binding to YAMLAndreas Klinger
devantech-srf04.yaml: yaml devicetree binding for iio ultrasonic proximity driver of devantech srf04 use devantech-srf04.txt, transform binding into yaml and remove the outdated DT documentation Signed-off-by: Andreas Klinger <ak@it-klinger.de> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04iio: frequency: ad9523: Fix typo in ad9523_platform_dataLars-Peter Clausen
Replace diff_{m1,m2} with div_{m1,m2} since they are dividers and not a differential settings. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04iio: Make possible to include driver.h firstAndy Shevchenko
If we put headers alphabetically sorted in the IIO driver, the compilation will abort because of unknown type to handle. Simple add a forward declaration of opaque struct iio_dev. Suggested-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04dt-bindings: iio: add Bosch BMG160 gyroscope sensorH. Nikolaus Schaller
Define bindings for "bosch,bmg160" and "bosch,bmi055_gyro". Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04iio: gyro: bmg160: add device tree compatibility tableH. Nikolaus Schaller
Add of_match_table. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>