aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/iio (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-09-29dt-bindings: iio: light: bh1750: Add device tree binding documentationryang1-0/+18
Document device tree bindings for ROHM BH1750 ambient light sensor driver. Signed-off-by: ryang <decatf@gmail.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-09-22iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor.Song Qiang1-0/+12
This driver was originally written by ST in 2016 as a misc input device driver, and hasn't been maintained for a long time. I grabbed some code from it's API and reformed it into an iio proximity device driver. This version of driver uses i2c bus to talk to the sensor and polling for measuring completes, so no irq line is needed. It can be tested with reading from /sys/bus/iio/devices/iio:deviceX/in_distance_input Signed-off-by: Song Qiang <songqiang1304521@gmail.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-09-14Merge tag 'iio-for-4.20a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman9-21/+197
Jonathan writes: 1st round of IIO new device support, features and cleanups in the 4.20 cycle. There is a merge commit in here to pull in regmap support for repeatedly reading the same register (to read out FIFOs). Used by the adxl372 driver. This will find uses elsewhere once we tidy up various drivers that are effectively doing this and relying on not enabling regcache. New device support * Analog devices ADXL372 accelerometer - new driver for this accelerometer including fifo and and interrupt support. Follow up patches enforce trigger validation, add sampling frequency control and filter bandwidth control. A later series added i2c support to the existing SPI support. * ST lsm6dsx - rework and add support fo the LSM6DSO 6 axis mems sensor. * Linear LTC 1660 DAC - new driver supporting the LTC 1660 and LTC 1665 SPI DACs. * Microchip mcp3911 ADC. - new driver for this integrated analog front end and ADC. * Qualcomm SPMI PMIC5 adc driver - using the spmi framework, new driver and bindings for this ADC. Follow up patch adds some missing channels. Features * ad5758 - support hard reset using a gpio (if provided). * mpu6050 - Regulator support * qcom-spmi-adc5 - Sanity check the channel numbers provided by DT to make sure the driver actually knows about them. * sc27xx - give raw data for channel 20 as it's used on all known boards for the headset which needs a custom converstion function. If it turns out someone builds a board where this isn't true we will deal with it when it happens. - add ADC scale calibration. * tsl2772 - support device tree binding to set the proximity led settings. - regulator supprot. - binding for apds9930 - trivial addition as register compatible with tsl2772. Cleanups / Minor fixes * adxl345 - supress a static checker warning but explicitly checking if the id object is null. * bh1750 - avoid CONFIG_PM_SLEEP checks. - SPDX. * bme680 - spelling mistake - use clamp rather than open coding. - white space and other similar fixes. - rename MSK to MASK for clarifty and use GENMASK to specify them. - use the FIELD_GET macro rather than a very odd accessor of dividing by 16 to get the shift. - rework to share handing for oversampling of the various channels in a unified way. - check explicitly for val2 in write_raw function to ensure it is 0. - drop some field defines that don't add anything. * dpot-adc - SPDX * envelope detector - SPDX * isl29501 - fix an ancient compiler warning mostly because it results in much nicer code. * max30102 - mark switch fall throughs. * max44000 - drop an unused variable. * max512 - avoid CONFIG_PM_SLEEP checks. * max5481 - use of_device_get_match_data rather than open coding it. * max5821 - avoid CONFIG_PM_SLEEP checks. * max9611 - explicity cast an enum to an integer to make it totally clear that this is intended. * mcp4018 - fix an inconsistent MODULE_LICENSE. - use of_device_get_match_data rather than open coding it. * mcp4531 - use of_device_get_match_data rather than open coding it. - SPDX * mcp4725 - avoid CONFIG_PM_SLEEP checks. * mcp4922 - Fix error handling and prevent writing a negative to when setting the output voltage. * ms5611 - drop deprecated compatible strings without manufacturer from being explicitly listed. They are handled anyway. - SPDX * multiplexer - SPDX * qcom-vadc - fix inconsistent documentation for reg. * ti-dac5571 - provide and of_match_table. * treewide - update Michael Hennerich's email address. - Use %pOFn rather than device_node.name. * documentation. - tidy up a wrong kernel version for the introduction of the position_relative ABI.
2018-09-08dt-bindings: adxl372: Document the adxl372 I2C bindingsStefan Popa1-2/+13
The adxl372 is designed to communicate in either SPI or I2C protocol. This patch adds the documentation of device tree bindings for adxl372 I2C. Signed-off-by: Stefan Popa <stefan.popa@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-09-08dt-bindings: iio: vadc: Fix documentation of 'reg'Matthias Kaehlcke1-2/+2
The documentation of Qualcomm's SPMI PMIC voltage ADC claims that the 'reg' property consists of two values, the SPMI address and the length of the controller's registers. However the SPMI bus to which it is added specifies "#size-cells = <0>;". Remove the controller register length from the documentation of the field and the example. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-09-08dt-bindings: iio: imu: st_lsm6dsx: add LSM6DSO device bindingsLorenzo Bianconi1-0/+1
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-09-02iio: dac: ad5758: Add support for hard resetStefan Popa1-0/+5
The ad5758 has a hardware reset active low input pin. This patch adds a devicetree entry for a reset GPIO and a new ad5758_reset() function. During initialization, it is checked if the reset property is specified and the the GPIO is being asserted, therefore the device will become active. When the reset function is called, if the gpio_reset var is set, then the GPIO will be toggled, otherwise a software reset is performed. Signed-off-by: Stefan Popa <stefan.popa@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-09-02iio: adc: sc27xx: Add ADC scale calibrationBaolin Wang1-0/+4
This patch adds support to read calibration values from the eFuse controller to calibrate the ADC channel scales, which can make ADC sample data more accurate. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-25dt-bindings: iio: dac: add bindings for ltc1660Marcus Folkesson1-0/+21
LTC1665/LTC1660 is a 8/10-bit Digital-to-Analog Converter (DAC) with eight individual channels. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19dt-bindings: iio: adc: add bindings for mcp3911Marcus Folkesson1-0/+30
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> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-19dt-bindings: iio: accel: Add docs for ADXL372Stefan Popa1-0/+22
Add the device tree binding documentation for the ADXL372 3-axis digital accelerometer. Signed-off-by: Stefan Popa <stefan.popa@analog.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-18Merge tag 'staging-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds10-11/+151
Pull staging and IIO updates from Greg KH: "Here are the big staging/iio patches for 4.19-rc1. Lots of churn here, with tons of cleanups happening in staging drivers, a removal of an old crypto driver that no one was using (skein), and the addition of some new IIO drivers. Also added was a "gasket" driver from Google that needs loads of work and the erofs filesystem. Even with adding all of the new drivers and a new filesystem, we are only adding about 1000 lines overall to the kernel linecount, which shows just how much cleanup happened, and how big the unused crypto driver was. All of these have been in the linux-next tree for a while now with no reported issues" * tag 'staging-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (903 commits) staging:rtl8192u: Remove unused macro definitions - Style staging:rtl8192u: Add spaces around '+' operator - Style staging:rtl8192u: Remove stale comment - Style staging: rtl8188eu: remove unused mp_custom_oid.h staging: fbtft: Add spaces around / - Style staging: fbtft: Erases some repetitive usage of function name - Style staging: fbtft: Adjust some empty-line problems - Style staging: fbtft: Removes one nesting level to help readability - Style staging: fbtft: Changes gamma table to define. staging: fbtft: A bit more information on dev_err. staging: fbtft: Fixes some alignment issues - Style staging: fbtft: Puts macro arguments in parenthesis to avoid precedence issues - Style staging: rtl8188eu: remove unused array dB_Invert_Table staging: rtl8188eu: remove whitespace, add missing blank line staging: rtl8188eu: use is_multicast_ether_addr in rtw_sta_mgt.c staging: rtl8188eu: remove whitespace - style staging: rtl8188eu: cleanup block comment - style staging: rtl8188eu: use is_multicast_ether_addr in rtl8188eu_xmit.c staging: rtl8188eu: use is_multicast_ether_addr in recv_linux.c staging: rtlwifi: refactor rtl_get_tcb_desc ...
2018-08-18dt-bindings: iio: tsl2772: add binding for avago,apds9930Brian Masney1-0/+1
This patch adds avago,apds9930 to the tsl2772 bindings. Signed-off-by: Brian Masney <masneyb@onstation.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-18dt-bindings: iio: tsl2772: add new bindingsBrian Masney1-0/+41
This patch adds the new properties amstaos,proximity-diodes and led-max-microamp to the tsl2772 driver. This patch also removes the driver from the trivial-devices.txt. Signed-off-by: Brian Masney <masneyb@onstation.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-08-18iio: imu: mpu6050: add support for regulator frameworkBrian Masney1-0/+1
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-03dt-bindings: iio: adc: Add DT binding document for PMIC5 ADCSiddartha Mohanadoss1-19/+58
PMIC5 ADC has support for clients to measure voltage and current on inputs connected to the PMIC. Clients include reading voltage phone power and on board system thermistors for thermal management. ADC5 on certain PMIC has support to read battery current. This change adds documentation. Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-25dt-bindings: remove 'interrupt-parent' from bindingsRob Herring33-39/+0
'interrupt-parent' is often documented as part of define bindings, but it is really outside the scope of a device binding. It's never required in a given node as it is often inherited from a parent node. Or it can be implicit if a parent node is an 'interrupt-controller' node. So remove it from all the binding files. Cc: Mark Rutland <mark.rutland@arm.com> Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
2018-07-23dt-bindings: iio: adc: add Meson8m2 supportMartin Blumenstingl1-0/+1
The Amlogic Meson SAR ADC implementation on the Meson8m2 SoC is identical to the Meson8b variant. Add a compatible string to indicate that we support the SAR ADC on the Meson8m2 SoC. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-23dt-bindings: iio: sigma-delta-modulator: fix unit-address in exampleFabrice Gasnier1-1/+1
Device tree compiler gives a warning if a device node has "@" but no reg property. Fix the example in iio: adc: sigma-delta-modulator. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-23iio: light: isl29501: Add support for the ISL29501 ToF sensor.Mathieu Othacehe1-0/+13
This patch adds support for the ISL29501 Time of Flight sensor. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-15iio: adxl345: Add support for the ADXL375Lars-Peter Clausen1-2/+5
The ADXL375 is fully register map compatible to the ADXL345 (including the device ID register returning the same value ...). The only difference is the resolution of the acceleration sensor. The ADXL375 can measure up to +-200g of acceleration. Datasheet: http://www.analog.com/media/en/technical-documentation/data-sheets/ADXL375.PDF Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-15iio: pressure: bmp280: remove unused options from device tree documentationBrian Masney1-7/+0
There are several options in the device tree documentation that are no longer relevant for the current in-kernel bmp280 driver so this patch removes them. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-15iio: imu: mpu6050: add support for 6515 variantBrian Masney1-0/+1
This patch adds support for the MPU 6515 variant. Confirmed that the driver functions correctly on a LG Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Marek <jonathan@marek.ca> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-15iio: hx711: fix spurious unit-address in exampleAndreas Klinger1-1/+1
Device tree compiler (dtc) gives a warning if a device node has "@" with a following number as it's name but no reg property. Fix the example in the documentation of avia,hx711 to conform to dtc behavior. Signed-off-by: Andreas Klinger <ak@it-klinger.de> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-15iio: hx711: add clock-frequency property in DTAndreas Klinger1-0/+6
Add clock-frequency property for hx711 ADC. This is the frequency of PD_SCK. After PD_SCK goes high DOUT is read just before PD_SCK goes down again. This is necessary because of parasitic capacitance on the wiring. Signed-off-by: Andreas Klinger <ak@it-klinger.de> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-07-07dt-bindings: iio: dac: Add docs for AD5758 DACStefan Popa1-0/+78
Signed-off-by: Stefan Popa <stefan.popa@analog.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-06-30dt-bindings: iio: Add Spreadtrum SC27XX PMICs ADC controller documentationBaolin Wang1-0/+36
This patch adds the binding documentation for Spreadtrum SC27XX series PMICs ADC controller device. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-06-10dt-bindings: iio: adc: at91-sama5d2_adc: add channel specific consumer infoEugen Hristev1-0/+9
Added defines for channel consumer device-tree binding Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-06-09Merge tag 'staging-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds12-10/+186
Pull staging/IIO updates from Greg KH: "Here is the big staging and IIO driver update for 4.18-rc1. It was delayed as I wanted to make sure the final driver deletions did not cause any major merge issues, and all now looks good. There are a lot of patches here, just over 1000. The diffstat summary shows the major changes here: 1007 files changed, 16828 insertions(+), 227770 deletions(-) Because of this, we might be close to shrinking the overall kernel source code size for two releases in a row. There was loads of work in this release cycle, primarily: - tons of ks7010 driver cleanups - lots of mt7621 driver fixes and cleanups - most driver cleanups - wilc1000 fixes and cleanups - lots and lots of IIO driver cleanups and new additions - debugfs cleanups for all staging drivers - lots of other staging driver cleanups and fixes, the shortlog has the full details. but the big user-visable things here are the removal of 3 chunks of code: - ncpfs and ipx were removed on schedule, no one has cared about this code since it moved to staging last year, and if it needs to come back, it can be reverted. - lustre file system is removed. I've ranted at the lustre developers about once a year for the past 5 years, with no real forward progress at all to clean things up and get the code into the "real" part of the kernel. Given that the lustre developers continue to work on an external tree and try to port those changes to the in-kernel tree every once in a while, this whole thing really really is not working out at all. So I'm deleting it so that the developers can spend the time working in their out-of-tree location and get things cleaned up properly to get merged into the tree correctly at a later date. Because of these file removals, you will have merge issues on some of these files (2 in the ipx code, 1 in the ncpfs code, and 1 in the atomisp driver). Just delete those files, it's a simple merge :) All of this has been in linux-next for a while with no reported problems" * tag 'staging-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1011 commits) staging: ipx: delete it from the tree ncpfs: remove uapi .h files ncpfs: remove Documentation ncpfs: remove compat functionality staging: ncpfs: delete it staging: lustre: delete the filesystem from the tree. staging: vc04_services: no need to save the log debufs dentries staging: vc04_services: vchiq_debugfs_log_entry can be a void * staging: vc04_services: remove struct vchiq_debugfs_info staging: vc04_services: move client dbg directory into static variable staging: vc04_services: remove odd vchiq_debugfs_top() wrapper staging: vc04_services: no need to check debugfs return values staging: mt7621-gpio: reorder includes alphabetically staging: mt7621-gpio: change gc_map to don't use pointers staging: mt7621-gpio: use GPIOF_DIR_OUT and GPIOF_DIR_IN macros instead of custom values staging: mt7621-gpio: change 'to_mediatek_gpio' to make just a one line return staging: mt7621-gpio: dt-bindings: update documentation for #interrupt-cells property staging: mt7621-gpio: update #interrupt-cells for the gpio node staging: mt7621-gpio: dt-bindings: complete documentation for the gpio staging: mt7621-dts: add missing properties to gpio node ...
2018-05-22iio: dac: Add support for external reference voltage through the regulator framework.Silvan Murer1-0/+14
Signed-off-by: Silvan Murer <silvan.murer@gmail.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-05-20dt-bindings: iio: afe: Spelling s/mesaurement/measurement/Geert Uytterhoeven2-2/+2
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-05-12iio: potentiostat: lmp91000: add LMP91002 supportMatt Ranostay1-3/+6
LMP91002 is register compatible so add devicetree and i2c client ids Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-05-12iio: adc: stm32-dfsdm: Add support for stm32mp1Fabrice Gasnier1-2/+5
Add support for DFSDM (Digital Filter For Sigma Delta Modulators) to STM32MP1. This variant is close to STM32H7 DFSDM, it implements 6 filter instances. Registers map is also increased. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-05-11Merge tag 'iio-for-4.18a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman9-5/+161
Jonathan writes: 1st round of IIO new device support, features and cleanup for the 4.18 cycle A nice mix this time of excellent cleanups (many to send drivers speeding toward staging graduations) and new drivers / device support. A good part of this is Brian Masney's never ending task on the tsl2x7x driver. The end is in sight so hopefully we'll get that one out of staging very soon! New device support * AD5686 - Support AD5685R (was wrongly present as AD5685) - Support AD5672R, AD5676, AD5676, AD5684R and AD5686R 4 and 8 channel SPI DACs with various precisions. - Support AD5671R, AD5675R, AD5694, AD5694R, AD5695R, AD5696 and AD5696R I2C DACs with various percisions and numbers of channels. * Analog front end rescale driver - New driver. - Support current sensing usings a shunt resistor. - Support simple voltage dividers. - support simple current sense amplifiers. * TI dac5571 - New driver and device bindings supporting: dac5571, dac6571, dac7571, dac5574, dac6574, dac7574, dac5573, dac6573 and dac7573 * Meson-adc - Support for Meson AXG with DT bindings. * mpu6050 - Support the mpu9255 which only requires additional WHOAMI entry and compatible string. * st_lsm6dsx - Support for lsm330dlc combinded accelerometer and gyro sensors with DT bindings. * stm32_adc - Add support for STM32MP1 with bindings. Staging graduations * adis16201 after some excelent cleanup by Himanshu Jha. * adis16029 after some excelent cleanup by Shreeya Patel. New features: * ABI docs - Add core ABI docs for angle channels. * inv_mpu6050 - Provide support for the full range of interrupts the device supports. * st_accel - Add SMO8840 ACPI ID seen in the wild on some Lenovo machines. * stx104 - Provide a multiple gpio get function. Cleanups / Minor fixes * core - Use new nested structure support to improve kernel-doc. * ad2s1200 - Use be16_to_cpup instead of opencoding. * ad5686 - Indentation tidy up. - Switch to SPDX - Refactor to allow various numbers of channels. - Refactor to separate core and SPI specific support, prior to addition of i2c equivalent devices. * ad7606 - Use drvdata directly from device rather than boucing via the platform_device structure. * ad7746 - Replace opencoded byte swapped i2c calls with _swapped variants. - White space and line break readability improvements. - Reorder includes and variable declarations where appropriate. * ad7791 - Changes to the AD ADC library used by this driver took in the sampling frequency. This lead to be the wrong path being the one tied to the resulting attribute, so it didn't work, and a warning to be printed. * ad7780 - Remove apparent support for sampling frequency control on devices that don't support changing the sampling attributes. * ade7854 - Fix a read of the wrong number of bits. - Improve error handling on i2c read/write errors. - Rework i2c and spi code to reduce duplication. * adis16201 (staging) - Improve meaning inherent in some macro names by adding units etc where relevant. - Adjust comments to improve detail and drop the irrelevant. - Rename register address definitions definitions to add a _REG postfix, clearly separating them from field definitions. Reorganize the definitions to group register address and fields. - Use sign_extend32 rather than open coding. - Reverse Xmas tree ordering where appropriate and align function args. - Remove unused headers. - Use GENMASK where appropriate instead of open coding. * adis16209 (staging) - Indent field definitions to visually separate them from register address definitions. - Use reverse xmas tree ordering where appropriate. - Add some whitespace where it will help readability. - Drop some unused headers. - Use GENMASK where appropriate. * ad2s1200 - Drop unnecessary includes and reorder alphabetically. - Reverse xmas tree and blank line cleanups. * atlas-ph-sensor - Use msleep instead of usleep_range where the precise value doesn't matter and the delays are long. * bcm150 - Drop transaction splitting as core now handles it. * cros_ec - Move the shared header to the include/iio/common directory. This brings it inline with the other multiple type devices. - Use drvdata directly from device rather than boucing via the platform_device structure. * hid-sensors - Use drvdata directly from device rather than boucing via the platform_device structure. * inv_mpu6050 - Clear out a second function definition for the same function. - Don't flush fifo when the iio buffer is full but just drop excess data. - Tidy up set_power_itg and ensure it is used in the right places. - Use set_power_itg rather than opencoding it again in the i2c mux control. - Make sure error paths disable the power if undoing power on. - Used managed devm_ functions during probe. Delete remove function. - Refactor to pull raw data read out of read_raw function. - Simplify data reading error paths. - Only enable the i2c mux for chips with the i2c aux bus (not icm20608) - Fix a potential deadlock due to varying lock ordering. - Fix an issue where first sample from gyro after enabling is unstable by dropping the first sample. - Fix an issue where the user_ctrl register is incorrectly overwritten. - Tidy up some grammar and spelling minor issus. * mcp320x - Use vendor compatible strings. * mcp4018 - Switch to using i2c .probe_new. * mcp4351 - switch to using i2c .probe_new. * meson-adc - rework handing on common ADC platform data so it can be shared across multiple families of SoCs. * sca3000 - Fix an error handling path if the ring configure fails. * st_lsm6dsx - Fix a wrong fifo threshold mask (no actual effect) * stm32-dfsdm - Style fixes and cleanups. - Check filter ID is in range and check spi-max-frequency. * tsl2x7x (staging) - Drop some unnecessary function calls, unused variables and unnecessary local variables. - Fix wrong interrupt type. - Avoid unnecessary double clear of interrupt. - Simplify proximity calibration call which did various things unrelated to actually calibrating. - Separate control of the proximity and ALS interrupts. - Improve consistency of logging. - Separate ALS and proximity persistence settings as they have separate hardware controls. - Tidy up variable ordering. - Add Brian to copyright notice given consider work on this driver. - Take advantage of hardware support for I2C address auto increment. - Combine individuaal enable and period attributes for the two directions on the threshold events into a single value as the hardware doesn't separate them. - Move integration_time* attributes from light channel to intensity value as they effect the intensity readings directly and the light reading only indirectly. Hence this better reflects reality. Also move the calibscale_available. - Avoid returning an error in the IRQ handler. - Hard code the reg value in _clear_interrupts as it only takes one value in the code. Result is the function has little purpose so opencode the two remaining i2c_smbus_write_byte calls. - Drop some unnecessary checking of the chip status register. - Tidy up return path in _write_interrupt_config. - Tidy up the ID verification code. - Move the power and diode settings defines into the header as these are needed for platform data configuration. - Various renames and comment cleanups for consistency and clarity. - Use actual device defaults for default startup settings. - SPDX - Add some range sanity checking to sysfs attribute writes. - Don't provide event interfaces if the interrupt line isn't available. - Use IIO_CONST_ATTR macro for calibscale_available as it's a constant string. - Fix the integration time and lux equations. - Make device IDs explicit index values in the device_channel_config array.
2018-05-07dt-bindings: iio: stm32-adc: add support for STM32MP1Fabrice Gasnier1-1/+5
Document support for STM32MP1 ADC. It's quite similar to STM32H7 ADC. Introduce "st,stm32mp1-adc" compatible to handle variants of this hardware such as vregready flag, interrupts, clock rate. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-05-06iio: ti-dac5571: Add DT binding documentationSean Nyekjaer1-0/+24
Adding binding documentation for Texas Instruments DAC5571 Family Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-04-28dt-bindings: iio: afe: add binding for current-sense-amplifierPeter Rosin1-0/+26
Similar to current sense shunts, but an amplifier enables the use of a smaller sense resistance. Signed-off-by: Peter Rosin <peda@axentia.se> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-04-28dt-bindings: iio: afe: add binding for voltage-dividerPeter Rosin1-0/+53
An ADC is often used to measure other quantities indirectly. This binding describe one cases, a "big" voltage measured with the help of a voltage divider. Signed-off-by: Peter Rosin <peda@axentia.se> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-04-28dt-bindings: iio: afe: add binding for current-sense-shuntPeter Rosin1-0/+41
An ADC is often used to measure other quantities indirectly. This binding describe one cases, a current through a shunt resistor measured by the voltage over it. Signed-off-by: Peter Rosin <peda@axentia.se> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-04-27dt-bindings: exynos: move ADC binding to iio/adc/ directoryRob Herring1-0/+103
Bindings are supposed to be organized by device class/function. Move the binding for Exynos ADC to the iio/adc/ binding directory. Signed-off-by: Rob Herring <robh@kernel.org>
2018-04-21dt-bindings: iio:imu:mpu6050: support more interrupt typesMartin Kelly1-3/+8
Document that the hardware supports falling edge, rising edge, level low, and level high interrupt types, rather than just rising edge. The language used is the same as that in st_lsm6dsx.txt. Signed-off-by: Martin Kelly <mkelly@xevo.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-04-21dt-bindings: iio: adc: mcp320x: Use vendor prefix compatible stringsFabian Mewes1-1/+1
Update the example to use the compatible string including the vendor prefix instead of the ones deprecated in 3a872138e4b. Signed-off-by: Fabian Mewes <architekt@coding4coffee.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-04-15iio: imu: Add mpu9255 support to mpu6050 driverDouglas Fischer1-0/+1
Added support for the mpu9255 IMU to the mpu6050 driver. The register map is the same as the other chips; the only driver difference is the compatible string and the WHOAMI register value. Signed-off-by: Douglas Fischer <fischerdouglasc@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-04-08Documentation: dt: iio: imu: st_lsm6dsx: add ism330dlc sensor device bindingLorenzo Bianconi1-0/+1
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-03-30dt-bindings: iio: adc: document the Meson AXG supportXingyu Chen1-0/+1
Update the documentation to expicitly support the Meson-AXG SoC. Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-03-28Merge 4.16-rc7 into staging-nextGreg Kroah-Hartman1-2/+2
We want the IIO and staging driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-03dt-bindings: iio: adc: stm32-dfsdm: fix types, add missing pinctrlFabrice Gasnier1-2/+6
- Add missing pinctrl description. Support is made optional as dfsdm may use internal sources (e.g. via registers) - Fix typo in IIO STM32 DFSDM filter "MANCH_F" description. Basically, this should be "falling edge = logic 0", not "1" that applies to "MANCH_R". BTW, make the description complete by describing both rising/falling edges as described in reference manuals. Fixes: 6c82f947fc97 ("IIO: add DT bindings for stm32 DFSDM filter") Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-02-24dt-bindings: iio: adc: sd-modulator: fix io-channel-cellsFabrice Gasnier1-2/+2
io-channel-cells should be <0> since sigma delta modulator exports only one channel, as described in ../iio/iio-bindings.txt "IIO providers" section. Only the phandle is necessary for IIO consumers in this case. Fixes: af11143757b7 ("IIO: Add DT bindings for sigma delta adc modulator") Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-02-20Merge tag 'iio-for-4.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-nextGreg Kroah-Hartman3-0/+103
Jonathan writes: First round of new devices, features and cleanups for IIO in the 4.17 cycle. Outside of IIO * Strongly typed 64bit int_sqrt function needed by the mlx90632 New device support * adc081s - New driver supporting adc081s, adc101s and adc121s TI ADCs. * ad5272 - New driver supproting the ad5272 and ad5274 ADI digital potentiometers with DT bindings. * axp20x_adc - support the AXP813 ADC - includes rework patches to prepare for this. * mlx90632 - New driver with dt bindings for this IR temperature sensor. Features * axp20x_adc - Add DT bindings and probing. * dht11 - The sensor has a wider range than advertised in the datasheet - support it. * st_lsm6dsx - Add hardware timestamp su9pport. Cleanups * ABI docs - Update email contact for Matt Ranostay * SPDX changes - Matt Ranostay has moved his drivers over to SPDX. Currently we are making this an author choice in IIO. * ad7192 - Disable burnout current on misconfiguration. No actually effect as they simply won't work otherwise. * ad7476 - Drop a license definition that was replicating information in SPDX tag. * ade7758 - Expand buf_lock to cover both buffer and state protection allowing unintented uses of mlock in the core to be removed. * ade7759 - Align parameters to opening parenthesis. * at91_adc - Depend on sysfs instead of selecting it - for try wide consistency. * ccs811 - trivial naming type for a define. * ep93xx - Drop a redundant return as a result checking platform_get_resource. * hts221 - Regmap conversion which simplifies the driver somewhat. - Clean up some restricted endian cast warnings. - Drop a trailing whitespace from a comment - Drop an unnecessary get_unaligned by changing to the right 16bit data type. * ms5611 - Fix coding style in the probe function (whitespace) * st_accel - Use strlcpy instead of strncpy to avoid potentially truncating a string.
2018-02-10dt-bindings: ad5272: Add bindings for Analog Devices digital potentiometersPhil Reid1-0/+27
Add binding documentation for Analog Devices AD5272 and AD5274 digital potentiometer devices. Signed-off-by: Phil Reid <preid@electromag.com.au> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>