aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-08-20iio: envelope-detector: switch to SPDX license identifierPeter Rosin1-4/+1
Drop the boilerplate license text. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-20iio: potentiometer: mcp4531: switch to SPDX license identifierPeter Rosin1-5/+2
Drop the boilerplate license text and use the correct MODULE_LICENSE. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-20iio: potentiometer: mcp4018: use the correct MODULE_LICENSEPeter Rosin1-1/+1
The file is GPL v2 only. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: potentiometer: merge calls to of_match_device and of_device_get_match_dataJulia Lawall3-15/+6
Drop call to of_match_device, which is subsumed by the subsequent call to of_device_get_match_data. The code becomes simpler, and a temporary variable can be dropped. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ local idexpression match; identifier i; expression x, dev, e, e1; @@ - match@i = of_match_device(x, dev); - if (match) e = of_device_get_match_data(dev); - else e = e1; + e = of_device_get_match_data(dev); + if (!e) e = e1; @@ identifier r.i; @@ - const struct of_device_id *i; ... when != i // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Peter Rosin <peda@axentia.se> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: chemical: bme680: Add check for val2 in the write_raw functionHimanshu Jha1-0/+3
val2 is responsible for the floating part of the number to be written to the device. We don't need the floating part while writing the oversampling ratio for BME680 since the available oversampling ratios are pure natural numbers. So, add a sanity check to make sure val2 is 0. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: adc: add support for mcp3911Marcus Folkesson3-0/+374
MCP3911 is a dual channel Analog Front End (AFE) containing two synchronous sampling delta-sigma Analog-to-Digital Converters (ADC). Co-developed-by: Kent Gustavsson <kent@minoris.se> Signed-off-by: Kent Gustavsson <kent@minoris.se> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: adxl345: move null check for i2c id at start of probeAlexandru Ardelean1-1/+4
Fixes ef89f4b96a2 ("iio: adxl345: Add support for the ADXL375"). This was found via static checker. After looking into the code a bit, it's unlikely that there will be a NULL dereference if the `id` object in that specific code path. However, it's safe to add a NULL (paranoid) check just to make sure and remove any uncertainties. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: max44000: remove unused variable max44000_alstim_shiftColin Ian King1-1/+0
Variable max44000_alstim_shift is defined but is never used hence it is redundant and can be removed. This variable has been like this since the driver was added back in 2016. Cleans up clang warning: warning: 'max44000_alstim_shift' defined but not used [-Wunused-const-variable=] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio:adxl372: Add FIFO and interrupts supportStefan Popa1-1/+356
This patch adds support for the adxl372 FIFO. In order to accomplish this, triggered buffers were used. The number of FIFO samples which trigger the watermark interrupt can be configured by using the buffer watermark. The FIFO format is determined by configuring the scan elements for each axis. The FIFO data is pushed to the IIO device's buffer. Signed-off-by: Stefan Popa <stefan.popa@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: adxl372: New driver for Analog Devices ADXL372 AccelerometerStefan Popa3-0/+537
This patch adds basic support for Analog Devices ADXL372 SPI-Bus Three-Axis Digital Accelerometer. The device is probed and configured the with some initial default values. With this basic driver, it is possible to read raw acceleration data. Datasheet: http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL372.pdf Signed-off-by: Stefan Popa <stefan.popa@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: adc: qcom-spmi-adc5: Add ADC5_AMUX_THM[24]_100K_PU to rev2 channel listMatthias Kaehlcke1-0/+4
Add ADC5_AMUX_THM2_100K_PU and ADC5_AMUX_THM4_100K_PU to the list of rev2 ADC channels. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: adc: max9611: explicitly cast gain_selectorsStefan Agner1-1/+1
After finding a reasonable gain, the function converts the configured gain to a gain configuration option selector enum max9611_csa_gain. Make the conversion clearly visible by using an explicit cast. This also avoids a warning seen with clang: drivers/iio/adc/max9611.c:292:16: warning: implicit conversion from enumeration type 'enum max9611_conf_ids' to different enumeration type 'enum max9611_csa_gain' [-Wenum-conversion] *csa_gain = gain_selectors[i]; ~ ^~~~~~~~~~~~~~~~~ Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: dac: mcp4725: avoid using CONFIG_PM_SLEEPMarcus Folkesson1-9/+3
This is already handled by SIMPLE_DEV_PM_OPS(). Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: dac: max5821: avoid using CONFIG_PM_SLEEPMarcus Folkesson1-8/+3
This is already handled by SIMPLE_DEV_PM_OPS(). Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: dac: max517: avoid using CONFIG_PM_SLEEPMarcus Folkesson1-8/+3
This is already handled by SIMPLE_DEV_PM_OPS(). Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19drivers: iio: Update MODULE AUTHOR email addressMichael Hennerich13-13/+13
no functional changes Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: health: max30102: Mark expected switch fall-throughsGustavo A. R. Silva1-2/+4
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case, I placed the "fall through" annotation at the bottom of the case, which is what GCC is expecting to find. Addresses-Coverity-ID: 1458342 ("Missing break in switch") Addresses-Coverity-ID: 1458345 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: pressure: ms5611: remove deprecated compatible stringsTomasz Duszynski2-4/+0
Compatible strings tend to follow manufacturer,model format. In case one wants to do a matching with manufacturer stripped off he can still do so since SPI/I2C core will try id_table based matching anyway. Signed-off-by: Tomasz Duszynski <tduszyns@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: chemical: bme680: simplify oversampling handlingDavid Frey1-63/+36
Temperature, pressure and humidity all expose and oversampling setting that works in the same way. Provide common handling for the oversampling sysfs attributes. Signed-off-by: David Frey <dpfrey@gmail.com> Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com> Tested-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: chemical: bme680: use FIELD_GET macroDavid Frey1-2/+2
Use the FIELD_GET macro instead of explicit mask and shift. Signed-off-by: David Frey <dpfrey@gmail.com> Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com> Tested-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: chemical: bme680: use GENMASK macroDavid Frey1-4/+4
Replace hardcoded bit masks with GENMASK macro Signed-off-by: David Frey <dpfrey@gmail.com> Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com> Tested-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: chemical: bme680: change MSK->MASK in #definesDavid Frey2-6/+6
Convert all defines to use "MASK" instead of a mix of "MSK" and "MASK" Signed-off-by: David Frey <dpfrey@gmail.com> Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com> Tested-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: chemical: bme680: indent #defines consistentlyDavid Frey1-8/+7
Signed-off-by: David Frey <dpfrey@gmail.com> Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com> Tested-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: chemical: bme680: cleanup bme680_read_calib formattingDavid Frey1-24/+12
Use the full 80 char width to reduce the number of lines taken by function calls. Remove blank lines where it aids clarity by bringing together related code blocks (such as read hi and low bytes and then combine them into one value). Signed-off-by: David Frey <dpfrey@gmail.com> Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com> Tested-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: chemical: bme680: use clamp macroDavid Frey1-4/+1
Signed-off-by: David Frey <dpfrey@gmail.com> Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com> Tested-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19iio: tsl2772: add support for regulator frameworkBrian Masney1-1/+94
This patch adds support for the regulator framework to the tsl2772 driver. Driver was tested using a LG Nexus 5 (hammerhead) phone with the two regulators and on a Raspberry Pi 2 without any regulators controlling the power to the sensor. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-18iio: tsl2772: add support for avago,apds9930Brian Masney1-2/+16
The Avago APDS9930 has the same register set as the TAOS/AMS TSL2772 so this patch adds the correct bindings and the appropriate LUX table values derived from the values in the datasheet. Driver was tested on a LG Nexus 5 (hammerhead) phone. avago,apds9930 datasheet: https://www.mouser.com/datasheet/2/678/avago_AV02-3190EN_DS_APDS-9930_2014-03-25[1]-1217273.pdf tsl2772 datasheet: https://ams.com/eng/content/download/291503/1066377/file/TSL2772_DS000181_2-00.pdf Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-18iio: tsl2772: add support for reading proximity led settings from device treeBrian Masney1-0/+81
This patch adds support for optionally reading the proximity led diode and current settings from device tree. This was tested using a LG Nexus 5 (hammerhead) which requires a different diode than the driver default for the IR LED. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-18iio: imu: mpu6050: add support for regulator frameworkBrian Masney2-0/+64
This patch adds support for the regulator framework to the mpu6050 driver. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Marek <jonathan@marek.ca> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-18iio: adc: Add QCOM SPMI PMIC5 ADC driverSiddartha Mohanadoss5-5/+1047
This patch adds support for QCOM SPMI PMIC5 family of ADC driver that supports hardware based offset and gain compensation. The ADC peripheral can measure both voltage and current channels whose input signal is connected to the PMIC ADC AMUX. The register set and configuration has been refreshed compared to the prior QCOM PMIC ADC family. Register ADC5 as part of the IIO framework. Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-03iio: chemical: fix spelling mistake "failted" -> "failed"Colin Ian King1-1/+1
fix spelling mistake in dev_err error message text Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-01iio: light: si1133: fix uninitialized resp variableMaxime Roussin-Bélanger1-0/+3
Read response register to detect any error. Signed-off-by: Maxime Roussin-Bélanger <maxime.roussinbelanger@gmail.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-01Merge branch 'fixes-togreg' into togregJonathan Cameron2-2/+2
2018-07-30iio: light: si1133 fix test for val being not zero or not one.Colin Ian King1-1/+1
The current check on val always results in true and so the call to sii1133_update_adcsens never gets called. Fix this check so it returns with -EINVAL only when val is not zero and not one. Detected by CoverityScan, CID#1472099 ("Logically dead code") Fixes: e01e7eaf37d8 ("iio: light: introduce si1133") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-29iio: adc: xilinx: Move request_irq before enabling interruptsManish Narani1-4/+4
Enabling the Interrupts before registering the irq handler is a bad idea. This patch corrects the same for XADC driver. Signed-off-by: Manish Narani <manish.narani@xilinx.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-29iio: adc: xilinx: Remove platform_get_irq from xadc_remove functionManish Narani2-5/+6
This patch avoids getting irq number in xadc_remove function. Instead store 'irq' in xadc struct and use xadc->irq wherever needed. This patch also resolves a warning reported by coverity where it asks to check return value of platform_get_irq() for any errors in xadc_remove. Signed-off-by: Manish Narani <manish.narani@xilinx.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-29iio: adc: xilinx: limit pcap clock frequency valueManish Narani1-0/+15
This patch limits the xadc pcap clock frequency value to be less than 200MHz. This fixes the issue when zynq is booted at higher frequency values, pcap crosses the maximum limit of 200MHz(Fmax) as it is derived from IOPLL. If this limit is crossed it is required to alter the WEDGE and REDGE bits of XADC_CFG register to make timings better in the interface. So to avoid alteration of these bits every time, the pcap value should not cross the Fmax limit. Signed-off-by: Manish Narani <manish.narani@xilinx.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-29iio: adc: xilinx: Check for return values in clk related functionsManish Narani1-2/+9
This patch adds check for return values from clock related functions. This was reported by static code analysis tool. Signed-off-by: Manish Narani <manish.narani@xilinx.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-29iio: vcnl4000: add support for VCNL4200Tomas Novotny2-10/+109
VCNL4200 is an integrated long distance (up to 1500mm) proximity and ambient light sensor. The support is very basic. There is no configuration of proximity and ambient light sensing yet. Only the reading of both measured values is done. The reading of ambient light and proximity values is blocking. If you request a new value too early, the driver waits for new value to be ready. Signed-off-by: Tomas Novotny <tomas@novotny.cz> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-29iio: vcnl4000: warn on incorrectly specified device idTomas Novotny1-1/+13
We can detect incorrectly specified device id for some chips, so warn user in that case. Signed-off-by: Tomas Novotny <tomas@novotny.cz> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-29iio: vcnl4000: add VCNL4010 and VCNL4020 device idTomas Novotny1-0/+9
The driver already supports VCNL4010/20 devices. The currently supported features and detectable product id are the same, so add shared id for them. This is a groundwork to extend the driver by detecting incorrectly specified device id. Signed-off-by: Tomas Novotny <tomas@novotny.cz> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-29iio: vcnl4000: make the driver extendableTomas Novotny1-18/+67
There are similar chips in the vcnl4xxx family. The initialization and communication is a bit different for members of the family, so this patch makes the driver extendable for different chips. There is no functional change. Signed-off-by: Tomas Novotny <tomas@novotny.cz> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-28iio: ad_sigma_delta: use unsigned long for timeoutNicholas Mc Guire1-2/+3
wait_for_completion_timeout returns unsigned long not int so an appropriate variable is declared and the assignment and check fixed up. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-28iio: chemical: Add support for Bosch BME680 sensorHimanshu Jha6-0/+1291
Bosch BME680 is a 4-in-1 sensor with temperature, pressure, humidity and gas sensing capability. It supports both I2C and SPI communication protocol for effective data communication. The device supports two modes: 1. Sleep mode 2. Forced mode The measurements only takes place when forced mode is triggered and a single TPHG cycle is performed by the sensor. The sensor automatically goes to sleep after afterwards. The device has various calibration constants/parameters programmed into devices' non-volatile memory(NVM) during production and can't be altered by the user. These constants are used in the compensation functions to get the required compensated readings along with the raw data. The compensation functions/algorithms are provided by Bosch Sensortec GmbH via their API[1]. As these don't change during the measurement cycle, therefore we read and store them at the probe. The default configs supplied by Bosch are also set at probe. 0-day tested with build success. GSoC-2018: https://summerofcode.withgoogle.com/projects/#6691473790074880 Mentor: Daniel Baluta [1] https://github.com/BoschSensortec/BME680_driver Datasheet: https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BME680-DS001-00.pdf Note from Jonathan: The compensation functions are 'interesting' and could do with a tidy up in future. However, they work so we can leave that for another day. Cc: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-28iio: ad9523: support for external signals via gpiosMichael Hennerich1-0/+30
The AD9523 supports external signals for power-down mode, resetting the device and sync timing. This change add support for specifying values for these signals via the gpios and initializing them default values. For the reset signal, the GPIO is toggled during probing to re-initialize the device to a known state. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> 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>
2018-07-28iio: ad9523: Fix return value for ad952x_store()Lars-Peter Clausen1-1/+1
A sysfs write callback function needs to either return the number of consumed characters or an error. The ad952x_store() function currently returns 0 if the input value was "0", this will signal that no characters have been consumed and the function will be called repeatedly in a loop indefinitely. Fix this by returning number of supplied characters to indicate that the whole input string has been consumed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Fixes: cd1678f96329 ("iio: frequency: New driver for AD9523 SPI Low Jitter Clock Generator") Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-25Merge tag 'iio-for-4.19b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman38-124/+3883
Jonathan writes: Second set of IIO new device support, features and cleanups. There are also a couple of fixes that can wait for the coming merge window. Core new features * Support for phase channels (used in time of flight sensors amongst other things) * Support for deep UV light channel modifier. New Device Support * AD4758 DAC - New driver and dt bindings. * adxl345 - Support the adxl375 +-200g part which is register compatible. * isl29501 Time of flight sensor. - New driver * meson-saradc - Support the Meson8m2 Socs - right now this is just an ID, but there will be additional difference in future. * mpu6050 - New ID for 6515 variant. * si1133 UV sensor. - New driver * Spreadtrum SC27xx PMIC ADC - New driver and dt bindings. Features * adxl345 - Add calibration offset readback and writing. - Add sampling frequency control. Fixes and Cleanups * ad5933 - Use a macro for the channel definition to reduce duplication. * ad9523 - Replace use of core mlock with a local lock. Part of ongoing efforts to avoid confusing the purpose of mlock which is only about iio core state changes. - Fix displayed phase which was out by a factor of 10. * adxl345 - Add a link to the datasheet. - Rework the use of the address field in the chan_spec structures to allow addition of more per channel information. * adis imu - Mark switch fall throughs. * at91-sama5d2 - Fix some casting on big endian systems. * bmp280 - Drop some DT elements that aren't used and should mostly be done from userspace rather than in DT. * hx711 - add clock-frequency dt binding and resulting delay to deal with capacitance issue on some boards. - fix a spurious unit-address in the example. * ina2xx - Avoid a possible kthread_stop with a stale task_struct. * ltc2632 - Remove some unused local variables (assigned but value never used). * max1363 - Use device_get_match_data to remove some boilerplate. * mma8452 - Mark switch fall throughs. * sca3000 - Fix a missing return in a switch statement (a bad fallthrough previously!) * sigma-delta-modulator - Drop incorrect unit address from the DT example. * st_accel - Use device_get_match_data to drop some boiler plate. - Move to probe_new for i2c driver as second parameter not used. * st_sensors library - Use a strlcpy (safe in this case). * st_lsm6dsx - Add some error logging. * ti-ads7950 - SPDX - Allow simultaneous buffered and polled reads. Needed on a Lego Mindstorms EV3 where some channels are used for power supply monitoring at a very low rate. * ti-dac5571 - Remove an unused variable. * xadc - Drop some dead code.
2018-07-24iio: sca3000: Fix missing return in switchGustavo A. R. Silva1-0/+1
The IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY case is missing a return and will fall through to the default case and errorenously return -EINVAL. Fix this by adding in missing *return ret*. Fixes: 626f971b5b07 ("staging:iio:accel:sca3000 Add write support to the low pass filter control") Reported-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-24iio: ad9523: Fix displayed phaseLars-Peter Clausen1-1/+1
Fix the displayed phase for the ad9523 driver. Currently the most significant decimal place is dropped and all other digits are shifted one to the left. This is due to a multiplication by 10, which is not necessary, so remove it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Fixes: cd1678f9632 ("iio: frequency: New driver for AD9523 SPI Low Jitter Clock Generator") Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-23iio: adc: meson-saradc: add support for the Meson8m2 SoCsMartin Blumenstingl1-0/+9
The SAR ADC on Meson8m2 behaves identical to the one found in the Meson8b SoCs. Add a separate compatible string because the temperature sensor logic (not supported yet) differs between Meson8 and Meson8m2 (however, it's the same for Meson8b and Meson8m2). Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>