summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio
AgeCommit message (Collapse)AuthorFilesLines
2020-09-16staging:iio:documentation: Drop most generic docsJonathan Cameron4-209/+0
These docs are both suffering from being out of date, and from being superceeded by the documentation in Documentation/driver-api/iio Note the inkern.txt drop is left for now as this is an area not well covered by the more recent documentation outside staging. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20200905174721.216452-5-jic23@kernel.org
2020-09-16staging:iio:light: drop stale ABI docsJonathan Cameron1-79/+0
There are no remaining light drivers in staging/iio. The content of this file are either included in the non staging ABI docs, or don't seem to be used in any current driver. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20200905174721.216452-4-jic23@kernel.org
2020-09-16staging:iio:light: Move tsl2x7x ABI docs to correct location.Jonathan Cameron1-13/+0
These seem to be up to date but never moved out of staging when the driver did. Hence let us move them out now. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Brian Masney <masneyb@onstation.org> Cc: Brian Masney <masneyb@onstation.org> Link: https://lore.kernel.org/r/20200905174721.216452-3-jic23@kernel.org
2020-09-16staging:iio:dac:max517 remove documentationJonathan Cameron1-41/+0
Whilst there is some useful info in here, it can be easily obtained from datasheets. Some of the info should perhaps be incorporated into a device tree bindings doc. As this didn't move out of staging with the driver, I'm suggesting we just drop it. We don't generally carry per driver documentation with the exception of non standard ABI which is not the case here. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Roland Stigge <stigge@antcom.de> Link: https://lore.kernel.org/r/20200905174721.216452-2-jic23@kernel.org
2020-09-16staging: iio: adis16240: Use Managed device functionsNuno Sá1-22/+3
Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-10-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-09-16staging: iio: adis16203: Use Managed device functionsNuno Sá1-23/+3
Use the adis managed device functions to setup the buffer and the trigger. The ultimate goal will be to completely drop the non devm version from the lib. Since we are here, drop the `.remove` callback by further using devm functions. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20200915120258.161587-9-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-08-22staging: iio: ad9834: Remove excess blank lineCalvin Glisson1-1/+0
Remove excess blank line after variable declarations. Improves code consistency and readability. Change suggested by checkpatch.pl: CHECK: Please don't use multiple blank lines Signed-off-by: Calvin Glisson <taragaram@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-08-22Staging: iio: Fixed a punctuation and a spelling mistake.Ankit Baluni1-2/+2
Added a missing comma and changed 'it it useful' to 'it is useful'. Signed-off-by: Ankit Baluni <b18007@students.iitmandi.ac.in> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-06-14iio: remove left-over parent assignmentsAlexandru Ardelean1-1/+0
These were found by doing some shell magic: ------------ for file in $(git grep -w devm_iio_device_alloc | cut -d: -f1 | sort | uniq) ; do if grep 'parent =' $file | grep -v trig | grep -vq devm_; then echo "$file -> $(grep "parent =" $file)" fi done ----------- The output is bearable [after the semantic patch is applied]. There is a mix of trigger assignments with some iio device parent assignments that are removed via this patch. JC: A few more added via inspection of all parent = statements in drivers/iio. Some of these may just have crossed with this series, others were less obvious to scripting due to some cross file / module boundary calls. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-06-14iio: remove left-over comments about parent assignmentAlexandru Ardelean1-1/+0
These were obtained by doing a 'git diff | grep \/\*', in the previous diff to find comments. These needed a bit more manual review, as the semantic patch isn't great for catching these. The result is: /* Initialize Counter device and driver data */ /* Initialize IIO device */ /* Establish that the iio_dev is a child of the spi device */ /* Estabilish that the iio_dev is a child of the spi device */ /* Initiate the Industrial I/O device */ /* Establish that the iio_dev is a child of the device */ - /* establish that the iio_dev is a child of the i2c device */ - /* establish that the iio_dev is a child of the i2c device */ /* This is only used for removal purposes */ /* setup the industrialio driver allocated elements */ /* variant specific configuration */ /* Setup for userspace synchronous on demand sampling. */ st->readback_delay_us += 5; /* Add tWAIT */ - /* Establish that the iio_dev is a child of the i2c device */ /* Establish that the iio_dev is a child of the i2c device */ Out of which, 4 are really left-over comments about parent assignment. 3 of them are removed by the semantic patch, as the comment removed (by spatch) would be for an empty line. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-06-14iio: remove explicit IIO device parent assignmentAlexandru Ardelean10-11/+0
This patch applies the semantic patch: @@ expression I, P, SP; @@ I = devm_iio_device_alloc(P, SP); ... - I->dev.parent = P; It updates 302 files and does 307 deletions. This semantic patch also removes some comments like '/* Establish that the iio_dev is a child of the i2c device */' But this is is only done in case where the block is left empty. The patch does not seem to cover all cases. It looks like in some cases a different variable is used in some cases to assign the parent, but it points to the same reference. In other cases, the block covered by ... may be just too big to be covered by the semantic patch. However, this looks pretty good as well, as it does cover a big bulk of the drivers that should remove the parent assignment. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-06-14iio: core: pass parent device as parameter during allocationAlexandru Ardelean1-3/+1
The change passes the parent device to the iio_device_alloc() call. This also updates the devm_iio_device_alloc() call to consider the device object as the parent device by default. Having it passed like this, should ensure that any IIO device object already has a device object as parent, allowing for neater control, like passing the 'indio_dev' object for other stuff [like buffers/triggers/etc], and potentially creating iiom_xxx(indio_dev) functions. With this patch, only the 'drivers/platform/x86/toshiba_acpi.c' needs an update to pass the parent object as a parameter. In the next patch all devm_iio_device_alloc() calls will be handled. Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-05-25Merge 5.7-rc7 into staging-nextGreg Kroah-Hartman1-5/+12
We need the staging/iio fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-11staging: iio: ad5933: attach life-cycle of kfifo buffer to parent device and ↵Alexandru Ardelean1-40/+37
use managed calls throughout This change makes the use of devm_iio_kfifo_allocate() to attach the life-cycle of the kfifo buffer to the parent (client->dev) object. This removes the need to explicitly free 'indio_dev->buffer' via iio_kfifo_free(), which is the main intent. Having done this, it is straight forward to move to devm_ calls throughout and drop the remove function. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-05-03staging: iio: ad2s1210: Fix SPI readingDragos Bogdan1-5/+12
If the serial interface is used, the 8-bit address should be latched using the rising edge of the WR/FSYNC signal. This basically means that a CS change is required between the first byte sent, and the second one. This change splits the single-transfer transfer of 2 bytes into 2 transfers with a single byte, and CS change in-between. Note fixes tag is not accurate, but reflects a point beyond which there are too many refactors to make backporting straight forward. Fixes: b19e9ad5e2cb ("staging:iio:resolver:ad2s1210 general driver cleanup.") Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-04-23Merge tag 'iio-for-5.8a' of ↵Greg Kroah-Hartman1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of new IIO device support, features and cleanup for the 5.8 cycle Usual mix of new drivers, new support in old drivers and lots of minor cleanup. Yaml conversions also continue to trickle in (plenty more to go!) New device support * ad7476 - Add ad7091 support (ID only) * ad9467 - New driver for this 200/250 MSPS adi-axi-adc and SPI attached ADC. * adi-axi-adc - New driver to support ADIs generic AXI ADC IP core, used to provide high speed interfaces to ADCs (JESD204B/C or parallel interfaces). Usually paired with a device using a slow configuration interface (spi etc) Includes DT bindings and some fixes for fpga headers. * bmg160 - Add support for BMI088 (ID only) * max1241 - New driver for this ADC. * st_sensors - Add support for LIS2HH12 accelerometer * sx9310 - New driver supporting sx9310 and sx9311 proximity sensors. Yaml DT binding conversions * rockchip-saradc (including adding some missing parts) * stm32-dac * tsl2563 * vcnl4000 Features * st_lsm6dsx - Add LIS3MDL as a possible sensor hub device. * vcnl4000 - Add new concept of near level (from DT) to provide to userspace which often needs to have some calibrated concept of 'near'. Cleanups, minor fixes etc. * core - Use snprintf for functions where strings are built and there is potential for overflow. - Correct docs to indicate mlock should not be used directly by drivers. - Fix up accidental dropping of a patch to use bitmap_zalloc. - Stop allowing enabling of buffers with no channels enabled. - Drop unused 'stufftoread' from iio_buffer. - Drop scan_el_attrs form iio_buffer as unused. - Reorder sanity checks in __iio_device_register to fail earlier. - Drop all the devm_ runregister / free functions from IIO as they were never used and encourage poor design. * dma-buffer - Tidy up includes. * dma-engine-buffer - Provide dev-managed allocator. - Fix an issue with printing a size_t * cross subsystem (kxsd9, bmg160, mpu3050, bmi160, mpu6050, bmc150) - Replace some unnecessary casts of error ptrs and whilst there. use the %pe printf parameter to print them in a more useful fashion. * cross subsystem - Drop casts in calls to regmap_bulk_read as they make no sense. - Use devm_platform_ioremap_resource to reduce boilerplate. - Fix typos in Analog Devices. * counters/104-quad - Add Syed Nayyar Waris as an additional maintainer. * ad7476 - Generate CONVST signal internally rather than requiring external trigger. Add sysfs read back as can now do so. - use devm_add_action_or_reset to tidy up error and remove handling. * ad7793 - Switch to read_avail from explicit attribute. Mostly done to avoid confusing people with a - sign (without surounding spaces) that was correct but checkpatch didn't like. * adis library - Add missing newlines at end of error messages. * adis16400 - Use DEFINE_DEBUGS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTR. * adis16460 - Use DEFINE_DEBUGS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTR. * ad_sigma_delta - Move some channel definitions into individual drivers to avoid having to deal with complex options. * ak8974 - Silence an error on deffered probe. * bmp280 - Harden against IRQ before registration. - Convert to read_avail instead of opencoding the equivalent. - Explicitly mark GPIO as optional. - Cleanup casts. - Remove line breaks from strings. * htts221 - Replace direct access to platform_data with dev_get_platdata(). - Use device properties rather than device tree ones to allow ACPI probing. - Casting cleanups. * intel_mrfld_adc - Don't use unaligned accessor for aligned data. * isl29125 - Reorder buer pre and post hooks to allow for coming core rework. * ltc2983 - Remove comp to bool. * max1363 - Stop using mlock from the iio_dev directly in favour of a local lock with clearly defined scope. * max30100 - Use generic device properties to allow ACPI probe. * mpu6050 - Convert to i2c_new_client_device. - Add debugfs register access. * st_lsm6dsx - Provide means of configuring full scale on slave device if supported. - Drop include of st_sensors header to get one value. Its not otherwise used by this driver. * st-sensors - Replace direct access to platform_data with dev_get_platdata(). - Casting cleanups. - Avoid splitting strings. * st_uvis25 - Casting cleanups. * tsl2563 - Typo fix. * tsl2772 - scnprintf in a non obvious string building usecase. Note also 'fixes' a wrong calculation of remaining space that couldn't actually cause any trouble as there was lots of room. * xilinx-xadc - Fix Lars-Peter spelling his own name wrong :) + additional typos. * tag 'iio-for-5.8a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (101 commits) iio: magnetometer: ak8974: Silence deferred-probe error Documentation: ABI: document IIO in_proximity_nearlevel file iio: vcnl4000: Export near level property for proximity sensor dt-bindings: iio: light: vcnl4000: Add proximity-near-level dt-bindings: iio: Introduce common properties for iio sensors dt-bindings: iio: vcnl4000: convert bindings to YAML format iio: Fix misspellings of "Analog Devices" iio: light: isl29125: fix iio_triggered_buffer_{predisable,postenable} positions iio: adc: fsl-imx25-gcq: Use devm_platform_ioremap_resource iio: adc: at91-adc: Use devm_platform_ioremap_resource iio: adc: sun4i-gpadc-iio: Use devm_platform_ioremap_resource iio:light:ltr501: Drop unnecessary cast of parameter in regmap_bulk_read iio:magn:mmc35240: Drop unnecessary casts of val parameter in regmap_bulk* iio:imu:mpu6050: Tidy up parameters to regmap_bulk functions. iio:chemical:bme680: Tidy up parameters to regmap_bulk_read iio:chemical:atlas-sensor: Drop unnecessary explicit casts in regmap_bulk_read calls iio:accel:mxc4005: Drop unnecessary explicit casts in regmap_bulk_read calls iio: imu: st_lsm6dsx: drop huge include in sensor-hub driver iio: buffer: drop devm_iio_kfifo_free() API call iio: buffer: drop devm_iio_hw_consumer_free() API call ...
2020-04-19iio: Fix misspellings of "Analog Devices"Geert Uytterhoeven1-1/+1
According to https://www.analog.com/, the company name is spelled "Analog Devices". Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-03-23staging: iio: adc: ad7280a: Add comments to clarify stringified argumentsDeepak R Varma1-0/+4
Checkpatch would flash a check message around a stringified macro argument containing a '-' character. Add comment to indicate the argument is legitimate and doesn't need fixing. Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com> Suggested-by: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/469bf8db1c228913e72841367182fba2168fe795.1584904896.git.mh12gx2825@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-08staging: iio: update TODORohit Sarkar1-7/+1
Since there are no uses of the old GPIO API, remove the item from the TODO. Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-03-08staging: iio: adc: ad7192: move out of stagingAlexandru Tachici3-1047/+0
Move ad7192 ADC driver out of staging into mainline. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-03-08Documentation: ABI: testing: ad7192: update sysfs docsAlexandru Tachici1-20/+0
Updated mainline documentation on ad7192 userspace sysfs. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-03-08staging: iio: adc: ad7192: removed spi_device_idAlexandru Tachici1-22/+11
This patch removes spi_device_id table and moves the init data (id of the chip) in the .data field of of_device_id table. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-03-08staging: iio: adc: ad7192: modify iio_chan_spec arrayAlexandru Tachici1-46/+66
This patch changes the static const struct iio_chan_spec arrays in a way that all the necessary attributes are set at compile time. Now ad7192_channels_config only makes the channels attribute of iio_dev point to the right array depending on the chip. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-03-08staging: iio: adc: ad7192: fail probe on get_voltageAlexandru Tachici1-2/+5
This patch makes the ad7192_probe fail in case regulator_get_voltage will return an error or voltage is set to 0. Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-03-08iio: imu: adis: Add self_test_reg variableNuno Sá2-0/+2
This patch adds a dedicated self_test_reg variable. This is also a step to let new drivers make use of `adis_initial_startup()`. Some devices use MSG_CTRL reg to request a self_test command while others use the GLOB_CMD register. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-01-12iio: adis: Remove startup_delayNuno Sá2-2/+0
All timeouts are now handled by a dedicated timeout struct. This variable is no longer needed. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-01-12iio: adis: Introduce timeouts structureNuno Sá2-0/+14
The adis library only allows to define a `startup_delay` which for some devices is enough. However, other devices define different timeouts with significantly different timings which could lead to devices to not wait enough time or to wait a lot more than necessary (which is not efficient). This patch introduces a new timeout struct that must be passed into `adis_init()`. There are mainly, for now, three timeouts used. This is also an introductory patch with the goal of refactoring `adis_initial_startup()`. New driver's (eg: adis16480, adis16460) are replicating code for the device initial setup. With some changes (being this the first one) we can pass this to `adis_initial_startup()`. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-12-15staging: iio: accel: adis16240: enforce SPI mode on probe functionRodrigo Carvalho1-0/+7
According to the datasheet, this driver supports only SPI mode 3, so we should enforce it on probe function. Signed-off-by: Rodrigo Carvalho <rodrigorsdc@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-10-18staging: iio: ad9834: add a check for devm_clk_getChuhong Yuan1-0/+4
ad9834_probe misses a check for devm_clk_get and may cause problems. Add a check like what ad9832 does to fix it. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-09-15staging: iio: ADIS16240: Remove unused includeRohit Sarkar1-1/+0
'#include<linux/gpio.h>' isn't being used anywhere. Remove it. Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-09-08staging: iio: adc: ad7192: Add system calibration supportMircea Caprioru1-1/+78
This patch will add a system calibration attribute for each channel. Using this option the user will have the ability to calibrate each channel for zero scale and full scale. It uses the iio_chan_spec_ext_info and IIO_ENUM to implement the functionality. Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-18staging: iio: accel: adis16240: Improve readability on write_raw functionRodrigo Ribeiro1-4/+1
Replace shift and minus operation by GENMASK macro and remove the local variables used to store intermediate data. Signed-off-by: Rodrigo Ribeiro Carvalho <rodrigorsdc@gmail.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-18staging: iio: adc: ad7192: Add low_pass_3db_filter_frequencyMircea Caprioru1-16/+133
By adding this option we are able to remove the sync3 field and dt binding. When setting the required cutoff frequency we also determine the ADC configuration for chop and sync filter. Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-08-18staging: iio: adc: ad7192: Remove platform dataMircea Caprioru2-49/+2
This patch removes the reference voltage entry from the platform_data structure. This is no longer needed since the reference voltage is obtained from the device tree. With this we also remove the entire ad7192.h file. The undefined reference voltage warning is promoted to an error signaling a problem with the device tree. Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-27staging: iio: ad2s1210: Use device-managed APIChuhong Yuan1-11/+1
Use device-managed API to simplify the code. The remove function is redundant now and can be deleted. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-27staging: iio: ad7192: create of_device_id arrayBárbara Fernandes1-0/+12
Create list of compatible device ids to be matched with those stated in the device tree. Signed-off-by: Bárbara Fernandes <barbara.fernandes@usp.br> Signed-off-by: Wilson Sales <spoonm@spoonm.org> Co-developed by: Wilson Sales <spoonm@spoonm.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-07-01Merge tag 'iio-for-5.3b' of ↵Greg Kroah-Hartman7-42/+74
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of IIO device support, features, cleanups and minor fixes for 5.3. A few bits for the counters subsystem mixed in here as well. There are some late breaking fixes as well, which aren't so urgent they can't wait for the merge window. New Device Support * adf4371 - New driver + bindings. - Support the adf4372 PLL. Mostly ID and bindings. * ad8366 (note includes rework of driver needed to allow support for these). - Support the ADL5240 variable gain amplifier (VGA). - Support the ADA4961 digital gain amplifier (DGA). * dps310 - New driver, in several parts from different authors for this temp and pressure sensor. - Includes errata workaround for a temperature reading issue. * stk3310 - Support the stk3335, mostly ID. Features and cleanups * core - drop error handling on debugfs registration. - harden by making sure we don't overrun iio_chan_info_postfix. * docs - convert remaining docs to rst. At somepoint we'll fit these few into the main IIO docs. - improve sampling_frequency_available docs but explaining the range form. * ad_sigma_delta - Drop a pointless goto. * ad2s1210 - Drop pointless platform data null check seeing as we don't actually use platform data anymore. * ad7124 - Relax limitation on channel numbers to allow pseudo different channels. - Support control of whether the input is buffered via DT. - Use dynamic allocation for channel configuration to make it easier to support new devices. - YAML binding conversion. * ad7150 - Comment tidy up. - Consistent and simple if (ret) handling of i2c errors. - FIELD_GET and GENMASK. - Ternary rather than !!(condition) for readability. - Use macros to avoid repetition of channel definitions. * ad7606 - Add software channel config (rather that pin controlled) - Refactor to simplify addition of new part in future. * ad7746 - of_deivce_id table. * ad7780 - MAINTAINERS entry - YAML DT bindings. * ad8366 - Stop using core mlock in favour of well scoped local lock. - SPDX + copyright date update. * ad9834 - of_device_id table * adf4371 - Add support for output stage muting before lock on has occured. * adis library - MAINTAINERS entry to reflect that this now Alexandru's problem ;) * adis162xx: - Fix a slightly incorrect set of comments and print statements on minimum supported voltage. * adis16203 - of_device_id table. * adis16240 - Add of_device_id table (in two parts as first patch only used it for MODULE_DEVICE_TABLE.) * adt7316-spi - of_device_id table * adxl372 - YAML DT binding conversion. - Cleanup use of buffer callback functions (precursor to core rework). * bh1710 - Simplify getting the i2c adapter from the client. * dht11 - Mote to newer GPIO consumer interface. * kxcjk-1013.c - Add binding for sensor in display of some ultrabooks after userspace tools updated for it not be a problem to report two similar sensors. * imx7d - drop unused variables. - white space - define instead of variable for clock frequency that is fixed. - drop pointless error message. * messon_saradc - SPDX * sps30 - MAINTAINERS entry - YAML binding conversion. * st_accel - Tidy up ordering in various buffer related callbacks. This is part of a long running effort to simplify the core code. * stm32-dfsdm: - Manage the resolution cleanly in triggerd modes. - Add fast mode support which allows more flexible filter choices. - Add a comment on the reason for a 16 bit record when technically not 'required'. * st_lsm6dsx - Embed device name in the sensor_settings struct as i3c doesn't have a convenient name field to use for this. * xilinx-adc - Relax constraints on supported platforms to reflect that this can used with FPGAs on PCIe cards and hence many architectures. * counters/ftm-quaddec - Fix some formatting io MODULE_AUTHOR - MAINTAINERS entry Fixes * tools - fix incorrect handling of 32 bit channels. * sca3000 - Potential endian bug that is unlikely to bite anyone (be64 host seems unlikely for this old part). * stm32-adc - Add vdda-supply. On some boards it needs to be turned on to supply the ADC. DT bindings included. * stm32-dfsdm - Fix output resolution to work with filter orders other than 3. - Fix output datatype as it's signed and previously claimed not to be. * tag 'iio-for-5.3b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (68 commits) iio: iio-utils: Fix possible incorrect mask calculation iio: frequency: adf4371: Add support for output stage mute dt-bindings: iio: frequency: Add ADF4372 PLL documentation iio: frequency: adf4371: Add support for ADF4372 PLL dt-bindings: iio: adc: Add buffered input property Convert AD7124 bindings documentation to YAML format. iio: adc: ad7124: Shift to dynamic allocation for channel configuration iio: adc: ad7124: Add buffered input support iio: adc: ad7124: Remove input number limitation MAINTAINERS: add ADIS IMU driver library entry iio: adis162xx: fix low-power docs & reports counter/ftm-quaddec: Add missing '>' in MODULE_AUTHOR iio: core: no need to check return value of debugfs_create functions docs: iio: convert to ReST iio: adc: stm32-adc: add missing vdda-supply dt-bindings: iio: adc: stm32: add missing vdda supply iio: adc: stm32-dfsdm: add comment for 16 bits record iio: adc: stm32-dfsdm: add fast mode support iio: adc: stm32-dfsdm: manage data resolution in trigger mode iio: adc: stm32-dfsdm: fix data type ...
2019-06-26iio: adis162xx: fix low-power docs & reportsAlexandru Ardelean2-3/+3
All current ADIS162XX drivers have incorrect values defined via comments. Also, when an error is reported the printed value is incorrect. The functionality itself isn't affected, so it's not a critical issue. And since the change is trivial, it was included in a single patch that fixes these in one go. All values were correlated with the ones specified in the data-sheets. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-23Merge 5.2-rc6 into staging-nextGreg Kroah-Hartman2-9/+13
We want the fixes and this resolves a merge issue as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-17staging: iio: ad7150: clean up of commentsMelissa Wen1-9/+2
General cleaning of comments to remove useless information or improve description. Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-17staging: iio: ad7150: simplify i2c SMBus return treatmentMelissa Wen1-7/+2
Since i2c_smbus_write_byte_data returns no-positive value, this commit making the treatment of its return value less verbose. Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-17staging: iio: ad7150: use FIELD_GET and GENMASKMelissa Wen1-1/+5
Use the bitfield macro FIELD_GET, and GENMASK to do the shift and mask in one go. This makes the code more readable than explicit masking followed by a shift. Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-17staging: iio: ad7150: use ternary operating to ensure 0/1 valueMelissa Wen1-2/+2
Remove idiom and use ternary operator for consistently trigger 0/1 value on variable declaration. Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-17staging: iio: ad2s1210: Remove platform data NULL check in probeAlexandru Ardelean1-3/+0
The driver only needs to access GPIOs via GPIOLIB. And SPI can be configured via device-tree or ACPI. The platform data is a remnant from another time, and should not cause the driver to error out during probing if it is NULL. Also, it's not used. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-06-08staging: iio: adt7316: Fix build errors when GPIOLIB is not setFabio Estevam1-1/+2
On x86_64 when GPIOLIB is not set the following build errors are seen: drivers/staging/iio/addac/adt7316.c:947:3: error: implicit declaration of function 'gpiod_set_value' [-Werror=implicit-function-declaration] drivers/staging/iio/addac/adt7316.c:1805:2: error: implicit declaration of function 'irqd_get_trigger_type' [-Werror=implicit-function-declaration] These functions are provided by the <linux/gpio/consumer.h> and <linux/irq.h> headers, so include them to fix these build errors. While at it, remove <linux/gpio.h> as this driver is a GPIO consumer and not a GPIO driver. Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-27staging:iio:ad7150: fix threshold mode config bitMelissa Wen1-8/+11
According to the AD7150 configuration register description, bit 7 assumes value 1 when the threshold mode is fixed and 0 when it is adaptive, however, the operation that identifies this mode was considering the opposite values. This patch renames the boolean variable to describe it correctly and properly replaces it in the places where it is used. Fixes: 531efd6aa0991 ("staging:iio:adc:ad7150: chan_spec conv + i2c_smbus commands + drop unused poweroff timeout control.") Signed-off-by: Melissa Wen <melissa.srw@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-26staging: iio: adis16240: add of_match_table entryRodrigo Ribeiro1-0/+1
This patch adds of_match_table entry in device driver in order to enable spi fallback probing. Signed-off-by: Rodrigo Ribeiro <rodrigorsdc@gmail.com> Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-26staging: iio: ad7746: add device tree supportJoão Seckler1-0/+10
Add a of_device_id struct variable and subsequent call to MODULE_DEVICE_TABLE macro to support device tree. Signed-off-by: João Seckler <joaoseckler@gmail.com> Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com> Co-developed-by: Lucas Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-26staging: iio: adis16240: add device to module device tableLucas Oshiro1-0/+6
Add a of_device_id struct and MODULE_DEVICE_TABLE call, in order to add device-tree support for this driver. Signed-off-by: Lucas Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: Rodrigo Ribeiro <rodrigorsdc@gmail.com> Co-developed-by: Rodrigo Ribeiro <rodrigorsdc@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-26staging: iio: adt7316: create of_device_id arrayBárbara Fernandes1-0/+13
Create structure of type of_device_id in order to register all devices the driver is able to manage. Signed-off-by: Bárbara Fernandes <barbara.fernandes@usp.br> Signed-off-by: Wilson Sales <spoonm@spoonm.org> Co-developed-by: Wilson Sales <spoonm@spoonm.org> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>