aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio (follow)
AgeCommit message (Collapse)AuthorFilesLines
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 git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman7-42/+74
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>
2019-05-26staging: iio: adis16203: Add of_device_id tableThiago Estrela1-0/+8
Accomplish device tree compatibility to driver ADIS16203 by adding of_device_id table and making a subsequent call to MODULE_DEVICE_TABLE. Signed-off-by: Thiago Estrela <thiagestrela@gmail.com> Signed-off-by: Tiago Napoli <napoli.tiago96@gmail.com> Co-developed-by: Tiago Napoli <napoli.tiago96@gmail.com> Signed-off-by: Pedro Sousa <pedroteosousa@gmail.com> Co-developed-by: Pedro Sousa <pedroteosousa@gmail.com> Reviewed-by: Matheus Tavares <matheus.bernardino@usp.br> Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-26staging: iio: ad9834: add of_device_id tableJoão Victor Marques de Oliveira1-0/+11
Add a of_device_id struct array of_match_table variable and subsequent call to MODULE_DEVICE_TABLE macro to enable explicit device tree support. Co-developed-by: Thiago L. A. Miller <tmiller@mochsl.org.br> Signed-off-by: Thiago L. A. Miller <tmiller@mochsl.org.br> Co-developed-by: Osvaldo M. Yasuda <omyasuda@yahoo.com.br> Signed-off-by: Osvaldo M. Yasuda <omyasuda@yahoo.com.br> Signed-off-by: João Victor Marques de Oliveira <joao.marques.oliveira@usp.br> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-26staging: iio: cdc: ad7150: create macro for capacitance channelsBárbara Fernandes1-17/+12
Create macro for capacitance channels in order to remove the repeated code and improve its readability. 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-05-05staging: iio: adc: Add paragraph to describe Kconfig symbolVatsala Narang1-0/+3
This patch updates Kconfig with paragraph that describe config symbol fully.Issue addressed by checkpatch. Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-05-05staging: iio: adt7316: match parenthesis alignmentJoão Seckler1-1/+1
This patch solves the following checkpatch.pl message: CHECK: Alignment should match open parenthesis. This makes the file more compliant with the preferred coding style for the Linux kernel. Signed-off-by: João Seckler <joaoseckler@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-25Merge tag 'iio-for-5.2b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman3-20/+34
Jonathan writes: Second set of IIO new device support, features and cleanup for the 5.2 cycle. New device suport * ad7606 - Support the AD7616 16 channel, 12bit ADC. * fxas21002c - New driver for this gyroscope with I2C and SPI support. * lsm6dsx - Support the lsm6dsr, new device information structure and dt bindings. * srf04 - Addition device IDs for mb1000, mb1010, mb1020, mb1030 and mb1040 + support of different required trigger pulse lengths. * st-accel - Support the ls2de12, new device info and dt bindings. * ti-ads8344 - New driver for this 8 channel, 16 bit SPI ADC. Binding conversions to yaml - we have started doing these in general for IIO. * avia-hx711 * bmp085 Cleanups and minor fixes / additions * ad5758 - Fixup for some changes between preproduction parts and final part. * ad7606 - Refactor handling of oversampling to make it easy to vary between supported devices. * ad9832 - Organise includes. - Clock framework to handle clocks. * ad9834 - Drop unnecessary parenthesis. * bmc150 - Use __func__ rather than hardcoding. * dummy_evgen. - Fix a memleak on error in probe. * kxcjk1013 - Add KXCJ91008 ACPI ID as seen in the wild. - Use __func__ rather than hardcoding. * imx7d - Local dev variable to simplify code a bit. - dev_err replaces pr_err to give more info. - devm_platform_ioremap_resource for small reduction in boilerplate. - Simplify probe and remove by sharing suspend / resume logic. - Devm for iio_device_register as remove only contains the unregister. * lsm6dsx - Remove a variable that was never read. - Open code values where they are effectively described by what is assigned to them rather than using uninformative defines. * max31856 - Avoid an unintialized ret variable in a path that can't actually occur but is hard for a static checker to know. * max9611 - White space * mpu3050 - Reduce a sleep worst case by switching from msleep to usleep_range. * qcom-spmi-adc5 - Add MODULE_DEVICE_TABLE to assist autoloading of this as a module. * stm32-dfsdm - Fix missing dependencies. * stm32-timer trigger - Fix a build issue when disabled. * ti-ads7950 - Fix mising dependency on CONFIG_GPIOLIB. * tag 'iio-for-5.2b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (42 commits) iio: adc: qcom-spmi-adc5: Fix of-based module autoloading iio: dummy_evgen: fix possible memleak in evgen init iio:accel:Switch hardcoded function name with a reference to __func__ making the code more maintainable iio: adc: stm32-dfsdm: fix triggered buffer build dependency iio: adc: stm32-dfsdm: fix unmet direct dependencies detected iio: trigger: stm32-timer: fix build issue when disabled iio: imx7d_adc: Use devm_iio_device_register() iio: imx7d_adc: Simplify imx7d_adc_remove() with imx7d_adc_suspend() iio: imx7d_adc: Simplify imx7d_adc_probe() with imx7d_adc_resume() drivers/iio/gyro/mpu3050-core.c: This patch fix the following checkpatch warning. iio: dac: ad5758: Modifications for new revision iio: imu: st_lsm6dsx: inline per-sensor data iio: adc: Add driver for the TI ADS8344 A/DC chips dt-bindings: iio: adc: Add bindings for TI ADS8344 A/DC chips MAINTAINERS: add entry for fxas21002c gyro driver iio: gyro: fxas21002c: add spi driver iio: gyro: fxas21002c: add i2c driver iio: gyro: add core driver for fxas21002c iio: gyro: add DT bindings to fxas21002c Kconfig: change configuration of srf04 ultrasonic iio sensor ...
2019-04-21Merge 5.1-rc6 into staging-nextGreg Kroah-Hartman2-5/+5
We want the fixes in here as well as this resolves an iio driver merge issue. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-14staging: iio: ad9832: use clock framework for clock referenceMarcelo Schmitt2-13/+25
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 Schmitt1-6/+8
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-14staging: iio: frequency: ad9834: Remove unnecessary parenthesesMelissa Wen1-1/+1
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-04Merge tag 'iio-for-5.2a-2' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman9-497/+227
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-04staging: iio: adc: ad7280a: Tab alignmentCristian Sicilia1-18/+18
Aligned some parameters. Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: adc: ad7192: Use read_avail for available attributesMircea Caprioru1-38/+61
This patch removes the in_voltage-voltage_scale_available and in_voltage_scale_available attributes. These are replaced with available attributes added in info_mask_shared_by_type_available. With this modification the iio core will be responsible with naming the attributes thus removing the checkpatch warning related to in_voltage-voltage_scale_available naming. Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad5933: change attributes to match ABIMarcelo Schmitt1-12/+12
Change device attributes' names to match ABI documentation. Names were chosen such that they tend to be similar to existing ABI so it should be easier to standardize them when necessary. Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: adc: ad7280a: Remove CamelCase notationCristian Sicilia1-6/+5
Fix CamelCase naming. Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: adc: ad7280a: Adding temp var to improve readabilityCristian Sicilia1-30/+25
Creating a temporary variable to improve readability Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: adc: ad7280a: Avoid precedence issues in macroCristian Sicilia1-3/+4
Enclosing parameter with parenthesis due to avoid possible precedence issue. Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad5933: add ABI documentationMarcelo Schmitt1-30/+0
Add an ABI documentation for the ad5933 driver. Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad5933: change help rule messageMarcelo Schmitt1-1/+1
Remove the previous comment about direct access via sysfs which would lead one think ad5933 driver has limitations it actually doesn't. Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad5933: add SPDX identifierMarcelo Schmitt1-2/+1
Add SPDX identifier of GPL-2.0 for the ad5933 driver. Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad5933: organize includesMarcelo Schmitt1-9/+9
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-04staging: iio: ad5933: change multi-line comment styleMarcelo Schmitt1-3/+6
Make multi-line comments compliant with the preferred code style. Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad7780: moving ad7780 out of stagingRenato Lui Geh3-390/+0
Move ad7780 ADC driver out of staging and into the mainline. The ad7780 is a sigma-delta analog to digital converter. This driver provides reading voltage values and status bits from both the ad778x and ad717x series. Its interface also allows writing on the FILTER and GAIN GPIO pins on the ad778x. Signed-off-by: Renato Lui Geh <renatogeh@gmail.com> Signed-off-by: Giuliano Belinassi <giuliano.belinassi@usp.br> Co-developed-by: Giuliano Belinassi <giuliano.belinassi@usp.br> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad7780: add new copyright holderRenato Lui Geh1-0/+1
This patch adds a new copyright holder to the ad7780 driver. Signed-off-by: Renato Lui Geh <renatogeh@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad7780: add SPDX identifierRenato Lui Geh1-2/+1
Add SPDX identifier (GPL-2.0) to the AD7780 driver. Signed-off-by: Renato Lui Geh <renatogeh@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad7780: move regulator to after GPIO initRenato Lui Geh1-10/+10
To maintain consistency between ad7780_probe and ad7780_remove orders, regulator initialization has been moved to after GPIO initializations. Signed-off-by: Renato Lui Geh <renatogeh@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging:iio:ad7780: add chip ID values and maskRenato Lui Geh1-0/+6
The ad7780 supports both the ad778x and ad717x families. Each chip has a corresponding ID. This patch provides a mask for extracting ID values from the status bits and also macros for the correct values for the ad7170, ad7171, ad7780 and ad7781. Signed-off-by: Renato Lui Geh <renatogeh@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad7780: set pattern values and masks directlyRenato Lui Geh1-11/+9
The AD7780 driver contains status pattern bits designed for checking whether serial transfers have been correctly performed. Pattern macros were previously generated through bit fields. This patch sets good pattern values directly and masks through GENMASK. Signed-off-by: Renato Lui Geh <renatogeh@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad7780: add filter reading to ad778xRenato Lui Geh1-4/+14
This patch adds the new feature of reading the filter odr value for ad778x chips. This value is stored in the chip's state struct whenever a read or write call is performed on the chip's driver. This feature requires sharing SAMP_FREQ. Since the ad717x does not have a filter option, the driver only shares the relevant info mask for the ad778x family. Signed-off-by: Renato Lui Geh <renatogeh@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad7780: add gain reading to ad778xRenato Lui Geh1-0/+5
This patch adds a new functionality of reading gain values from the ad778x chips. This value is stored in the chip's state struct and is updated whenever a read or write call is performed on the driver. Signed-off-by: Renato Lui Geh <renatogeh@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2019-04-04staging: iio: ad7780: add missing switch default caseRenato Lui Geh1-0/+2
This patch simply adds a missing switch default case in read_raw. Signed-off-by: Renato Lui Geh <renatogeh@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>