summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-18 11:33:12 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-18 11:33:12 +0100
commit281d90e24f1378967531d715decf6b81ecba664e (patch)
tree8da0b30ba74495d31b66db1aa3af6c3d3d57a8c0
parent09dd629eeabb8af4d261ba9eb4b21d7e440362bc (diff)
parentfe297f8f048a7a0663479dcf6447ec450b53b905 (diff)
Merge tag 'iio-5.7a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes: First set of new IIO device support, fatures and cleanups for the 5.7 cycle Includes changes for the counter subsystem Core Feature * Explicitly handle sysfs values in dB, including correctly handling the needed postfix dB. * Add a TODO to suggest suitable activities for new contributors to IIO now the vast majority of drivers are out of staging (and the remaining ones there are 'hard'). Also update the TODO in staging to remove stale entries. Staging graduations * ad7192 ADC. New device support * ad5770r - New driver for this 6 channel DAC including DT bindings. * ad8366 - Add supprot for the hmc1119 attenuator. * al3010 - New driver supporting this Dyna-image light sensors. - Power management and DT bindings added in additional patches. * atlas-sensor - Add support for atlas DO-SM device. Reads disolved oxygen in a solution. * gpap002x00f - New driver and bindings to support the GP2AP002A00F and GP2AP002S00F light and proximity sensors. There is some limited existing support in input. The intent is to drop this driver once IIO driver is in place. * hmc425a - New driver for this attenuator. * icp10100 - New driver for this presure sensor. * ltc2632 - Add support for the ltc2636 8 channel DAC. Includes bindings and some tidying up of the driver. * inv_mpu6050 - Support IAM20680, ICM20609, ICM20689 and ICM20690. Includes related tidy up and rework of low pass filter bandwidth handling to give suitable values for all chips. Binding conversions to yaml or missing bindings docs. * atlas-sensor, including consolidation of previous 3 separate docs into 1. * ad7923, previously no doc. * max1363, split into max1238 and max1363 to simplify yaml. * stm32-adc Features * (counter) 104-quad-8 - Support a filter clock prescaler. - Support reporting of encoder cable status. * ad7124 - Low pass filter support. - Debugfs interface to access registers directly. * ad8366 - Support control of hardware gain. * inv_mpu6050 - Runtime pm with autosuspend. * npcm adc - Add reset support. This is a breaking change if DT is not in sync, however this device is a BMC so the ecosystem is closed enought that this should not be a problem. * srf04 - Add power management with DT bindings for the GPIO. * stm32-timer-trigger - Power management. * (counter) stm32-timer-cnt - Power management. * vcnl4000 - Enable runtime PM for devices that don't use on demand measurement. Cleanups and minor fixes * core - Avoid double read when using debugfs. Whilst we provide no guarantees on lack of side effects using the debugfs interfaces, this one is generate unexpected results so let us tidy it up. * dac/Kconfig - Alphabetic order. * ad5755 - Grammar and minor other fixes. * ad7124 - Fail probe if get_voltage fails as no meaningful readings can be had without knowing the external reference. - Switch to selection between different channel attributes rather than building the arrays at runtime. - Remove the spi_device_id table as the driver cannot be probled without more information that can be provided without dt. - Update sysfs docs to provide more inormation and bring remaining docs for this part out of staging. * ad9292 - Use new SPI transfer delay structure. * adis library - Add unlocked version of adis_initial_startup and refactor the function. - Add a product ID santiy check. - Add support for different self test registers. - Use new SPI delay structure. - Add new docs and tidy up existing. * adis16136 - Initialize adis_data statically. * adis16400 - Initialize adis_data statically. * adis16460 - Use core __adis_initial_Startup now it supports everything needed. * adis16480 - Initialize adis_data statically. - Use core __adis_initial_startup now it supports everything needed. * al3320a - Add missing DT binding docs. - Tidy up code formatting. - Simplify error paths using devm_add_action_or_reset. - Ensure autoloading works by adding the of_match_table. * atlas-sensor - Drop false requirement for interrupt line, the value can be polled using a sysfs or hrtimer type trigger. * exynos-adc - Silence warning message on deferring probe. * gp2ap002 - Greatly simplify the Lux LUT. - Reorder actions around buffer setup and tear down as part of a sub-system wide standardization of these. * inv_mpu6050 - Various lttle tidyups. - Simpliy I2C aux MUX handling by enabling it only at startup. It never needs to be disabled. - Simplify polling rate when magnetometer enabled by putting only under control of userspace. - Always execute full reset on devices supporting spi. It does no harm when using i2c and makes for simpler code. - Reduce over the top sleep times for vddio regulator power up. - Greatly simplify power and engine management. - Fix some delays in polled reads (only visible due to other changes) - Stop preventing sampling rate changes whilst running as there is no adverse consequence of doing so. - Prevent attempting to read the temperature if neither accel nor gyro is enabled. * lmp9100 - Reorder actions around buffer setup and tear down as part of a sub-system wide standardization of these. * max1118 - Use new SPI transfer delay structure. * mcp320x - Use new SPI transfer delay structure. * si1133 - Read full 24 bit signed integer instead o dropping last 8 bits of value. Not a critical fix as just adds precision. * st_sensors - Use st_sensors_dev_name_probe instead of open coded version in st_accel - Handle potential memory allocation failure. * st_lsm6dsx - Fix some wrong structure element naming in documentation. - Add missing return value check. * stm32_timer_cnt - Drop some unused left over IIO headers from this count subsystem driver. - Ensure the clock is enabled in master mode. Theoretical issue rather than one known to happen in the wild. * tlc4541 - Use new SPI delay structure. * tag 'iio-5.7a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (98 commits) iio: dac: Kconfig: sort symbols alphabetically iio: light: gp2ap020a00f: fix iio_triggered_buffer_{predisable,postenable} positions iio: potentiostat: lmp9100: fix iio_triggered_buffer_{predisable,postenable} positions iio: trigger: stm32-timer: add power management support iio: trigger: stm32-timer: rename enabled flag iio: add a TODO counter: 104-quad-8: Support Differential Encoder Cable Status counter: 104-quad-8: Support Filter Clock Prescaler iio: pressure: icp10100: add driver for InvenSense ICP-101xx iio: industrialio-core: Fix debugfs read iio: imu: adis: add a note better explaining state_lock iio: imu: adis: update 'adis_data' struct doc-string iio: imu: adis: add doc-string for 'adis' struct iio: imu: adis_buffer: Use new structure for SPI transfer delays iio: adc: ti-tlc4541: Use new structure for SPI transfer delays iio: adc: mcp320x: Use new structure for SPI transfer delays iio: adc: max1118: Use new structure for SPI transfer delays iio: adc: ad9292: Use new structure for SPI transfer delays iio: adc: exynos: Silence warning about regulators during deferred probe staging: iio: update TODO ...
-rw-r--r--Documentation/ABI/testing/sysfs-bus-counter-104-quad-825
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio-adc-ad719224
-rw-r--r--Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml65
-rw-r--r--Documentation/devicetree/bindings/iio/adc/max1363.txt63
-rw-r--r--Documentation/devicetree/bindings/iio/adc/maxim,max1238.yaml76
-rw-r--r--Documentation/devicetree/bindings/iio/adc/maxim,max1363.yaml50
-rw-r--r--Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt2
-rw-r--r--Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt149
-rw-r--r--Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml458
-rw-r--r--Documentation/devicetree/bindings/iio/amplifiers/adi,hmc425a.yaml49
-rw-r--r--Documentation/devicetree/bindings/iio/chemical/atlas,ec-sm.txt21
-rw-r--r--Documentation/devicetree/bindings/iio/chemical/atlas,orp-sm.txt21
-rw-r--r--Documentation/devicetree/bindings/iio/chemical/atlas,ph-sm.txt21
-rw-r--r--Documentation/devicetree/bindings/iio/chemical/atlas,sensor.yaml53
-rw-r--r--Documentation/devicetree/bindings/iio/dac/adi,ad5770r.yaml185
-rw-r--r--Documentation/devicetree/bindings/iio/dac/ltc2632.txt8
-rw-r--r--Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt5
-rw-r--r--Documentation/devicetree/bindings/iio/light/dynaimage,al3010.yaml43
-rw-r--r--Documentation/devicetree/bindings/iio/light/dynaimage,al3320a.yaml43
-rw-r--r--Documentation/devicetree/bindings/iio/light/sharp,gp2ap002.yaml85
-rw-r--r--Documentation/devicetree/bindings/iio/proximity/devantech-srf04.yaml18
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.yaml2
-rw-r--r--MAINTAINERS25
-rw-r--r--drivers/counter/104-quad-8.c136
-rw-r--r--drivers/counter/stm32-timer-cnt.c66
-rw-r--r--drivers/iio/TODO19
-rw-r--r--drivers/iio/accel/adis16201.c1
-rw-r--r--drivers/iio/accel/adis16209.c1
-rw-r--r--drivers/iio/accel/st_accel_i2c.c5
-rw-r--r--drivers/iio/adc/Kconfig12
-rw-r--r--drivers/iio/adc/Makefile1
-rw-r--r--drivers/iio/adc/ad7124.c99
-rw-r--r--drivers/iio/adc/ad7192.c (renamed from drivers/staging/iio/adc/ad7192.c)152
-rw-r--r--drivers/iio/adc/ad7292.c5
-rw-r--r--drivers/iio/adc/exynos_adc.c6
-rw-r--r--drivers/iio/adc/max1118.c10
-rw-r--r--drivers/iio/adc/mcp320x.c3
-rw-r--r--drivers/iio/adc/npcm_adc.c30
-rw-r--r--drivers/iio/adc/ti-tlc4541.c3
-rw-r--r--drivers/iio/amplifiers/Kconfig10
-rw-r--r--drivers/iio/amplifiers/Makefile1
-rw-r--r--drivers/iio/amplifiers/ad8366.c30
-rw-r--r--drivers/iio/amplifiers/hmc425a.c248
-rw-r--r--drivers/iio/chemical/atlas-sensor.c97
-rw-r--r--drivers/iio/common/st_sensors/st_sensors_core.c4
-rw-r--r--drivers/iio/dac/Kconfig71
-rw-r--r--drivers/iio/dac/Makefile1
-rw-r--r--drivers/iio/dac/ad5755.c22
-rw-r--r--drivers/iio/dac/ad5770r.c695
-rw-r--r--drivers/iio/dac/ltc2632.c102
-rw-r--r--drivers/iio/gyro/adis16136.c62
-rw-r--r--drivers/iio/gyro/adis16260.c1
-rw-r--r--drivers/iio/imu/adis.c68
-rw-r--r--drivers/iio/imu/adis16400.c140
-rw-r--r--drivers/iio/imu/adis16460.c40
-rw-r--r--drivers/iio/imu/adis16480.c197
-rw-r--r--drivers/iio/imu/adis_buffer.c3
-rw-r--r--drivers/iio/imu/inv_mpu6050/Kconfig12
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_core.c651
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c111
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h58
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_magn.c49
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_magn.h5
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c57
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_spi.c74
-rw-r--r--drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c160
-rw-r--r--drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h4
-rw-r--r--drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c5
-rw-r--r--drivers/iio/industrialio-core.c54
-rw-r--r--drivers/iio/light/Kconfig21
-rw-r--r--drivers/iio/light/Makefile2
-rw-r--r--drivers/iio/light/al3010.c242
-rw-r--r--drivers/iio/light/al3320a.c72
-rw-r--r--drivers/iio/light/gp2ap002.c720
-rw-r--r--drivers/iio/light/gp2ap020a00f.c23
-rw-r--r--drivers/iio/light/si1133.c37
-rw-r--r--drivers/iio/light/vcnl4000.c144
-rw-r--r--drivers/iio/potentiostat/lmp91000.c18
-rw-r--r--drivers/iio/pressure/Kconfig11
-rw-r--r--drivers/iio/pressure/Makefile1
-rw-r--r--drivers/iio/pressure/icp10100.c658
-rw-r--r--drivers/iio/proximity/srf04.c96
-rw-r--r--drivers/iio/trigger/stm32-timer-trigger.c161
-rw-r--r--drivers/staging/iio/Documentation/sysfs-bus-iio-ad719220
-rw-r--r--drivers/staging/iio/TODO8
-rw-r--r--drivers/staging/iio/accel/adis16203.c1
-rw-r--r--drivers/staging/iio/accel/adis16240.c1
-rw-r--r--drivers/staging/iio/adc/Kconfig12
-rw-r--r--drivers/staging/iio/adc/Makefile1
-rw-r--r--include/linux/iio/iio.h2
-rw-r--r--include/linux/iio/imu/adis.h51
91 files changed, 6045 insertions, 1329 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-counter-104-quad-8 b/Documentation/ABI/testing/sysfs-bus-counter-104-quad-8
index 46b1f33b2fce..eac32180c40d 100644
--- a/Documentation/ABI/testing/sysfs-bus-counter-104-quad-8
+++ b/Documentation/ABI/testing/sysfs-bus-counter-104-quad-8
@@ -1,3 +1,28 @@
+What: /sys/bus/counter/devices/counterX/signalY/cable_fault
+KernelVersion: 5.7
+Contact: linux-iio@vger.kernel.org
+Description:
+ Read-only attribute that indicates whether a differential
+ encoder cable fault (not connected or loose wires) is detected
+ for the respective channel of Signal Y. Valid attribute values
+ are boolean. Detection must first be enabled via the
+ corresponding cable_fault_enable attribute.
+
+What: /sys/bus/counter/devices/counterX/signalY/cable_fault_enable
+KernelVersion: 5.7
+Contact: linux-iio@vger.kernel.org
+Description:
+ Whether detection of differential encoder cable faults for the
+ respective channel of Signal Y is enabled. Valid attribute
+ values are boolean.
+
+What: /sys/bus/counter/devices/counterX/signalY/filter_clock_prescaler
+KernelVersion: 5.7
+Contact: linux-iio@vger.kernel.org
+Description:
+ Filter clock factor for input Signal Y. This prescaler value
+ affects the inputs of both quadrature pair signals.
+
What: /sys/bus/counter/devices/counterX/signalY/index_polarity
KernelVersion: 5.2
Contact: linux-iio@vger.kernel.org
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-adc-ad7192 b/Documentation/ABI/testing/sysfs-bus-iio-adc-ad7192
index 7627d3be08f5..f8315202c8f0 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio-adc-ad7192
+++ b/Documentation/ABI/testing/sysfs-bus-iio-adc-ad7192
@@ -2,17 +2,22 @@ What: /sys/bus/iio/devices/iio:deviceX/ac_excitation_en
KernelVersion:
Contact: linux-iio@vger.kernel.org
Description:
- Reading gives the state of AC excitation.
- Writing '1' enables AC excitation.
+ This attribute, if available, is used to enable the AC
+ excitation mode found on some converters. In ac excitation mode,
+ the polarity of the excitation voltage is reversed on
+ alternate cycles, to eliminate DC errors.
What: /sys/bus/iio/devices/iio:deviceX/bridge_switch_en
KernelVersion:
Contact: linux-iio@vger.kernel.org
Description:
- This bridge switch is used to disconnect it when there is a
- need to minimize the system current consumption.
- Reading gives the state of the bridge switch.
- Writing '1' enables the bridge switch.
+ This attribute, if available, is used to close or open the
+ bridge power down switch found on some converters.
+ In bridge applications, such as strain gauges and load cells,
+ the bridge itself consumes the majority of the current in the
+ system. To minimize the current consumption of the system,
+ the bridge can be disconnected (when it is not being used
+ using the bridge_switch_en attribute.
What: /sys/bus/iio/devices/iio:deviceX/in_voltagex_sys_calibration
KernelVersion:
@@ -21,6 +26,13 @@ Description:
Initiates the system calibration procedure. This is done on a
single channel at a time. Write '1' to start the calibration.
+What: /sys/bus/iio/devices/iio:deviceX/in_voltage2-voltage2_shorted_raw
+KernelVersion:
+Contact: linux-iio@vger.kernel.org
+Description:
+ Measure voltage from AIN2 pin connected to AIN(+)
+ and AIN(-) shorted.
+
What: /sys/bus/iio/devices/iio:deviceX/in_voltagex_sys_calibration_mode_available
KernelVersion:
Contact: linux-iio@vger.kernel.org
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
new file mode 100644
index 000000000000..a11b918e0016
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/adi,ad7923.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD7923 and similars with 4 and 8 Channel ADCs.
+
+maintainers:
+ - Michael Hennerich <michael.hennerich@analog.com>
+ - Patrick Vasseur <patrick.vasseur@c-s.fr>
+
+description: |
+ Analog Devices AD7904, AD7914, AD7923, AD7924 4 Channel ADCs, and AD7908,
+ AD7918, AD7928 8 Channels ADCs.
+
+ Specifications about the part can be found at:
+ https://www.analog.com/media/en/technical-documentation/data-sheets/AD7923.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/AD7904_7914_7924.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/AD7908_7918_7928.pdf
+
+properties:
+ compatible:
+ enum:
+ - adi,ad7904
+ - adi,ad7914
+ - adi,ad7923
+ - adi,ad7924
+ - adi,ad7908
+ - adi,ad7918
+ - adi,ad7928
+
+ reg:
+ maxItems: 1
+
+ refin-supply:
+ description: |
+ The regulator supply for ADC reference voltage.
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+required:
+ - compatible
+ - reg
+
+examples:
+ - |
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ad7928: adc@0 {
+ compatible = "adi,ad7928";
+ reg = <0>;
+ spi-max-frequency = <25000000>;
+ refin-supply = <&adc_vref>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
diff --git a/Documentation/devicetree/bindings/iio/adc/max1363.txt b/Documentation/devicetree/bindings/iio/adc/max1363.txt
deleted file mode 100644
index 94a9011dd860..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/max1363.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-* Maxim 1x3x/136x/116xx Analog to Digital Converter (ADC)
-
-The node for this driver must be a child node of a I2C controller, hence
-all mandatory properties for your controller must be specified. See directory:
-
- Documentation/devicetree/bindings/i2c
-
-for more details.
-
-Required properties:
- - compatible: Should be one of
- "maxim,max1361"
- "maxim,max1362"
- "maxim,max1363"
- "maxim,max1364"
- "maxim,max1036"
- "maxim,max1037"
- "maxim,max1038"
- "maxim,max1039"
- "maxim,max1136"
- "maxim,max1137"
- "maxim,max1138"
- "maxim,max1139"
- "maxim,max1236"
- "maxim,max1237"
- "maxim,max1238"
- "maxim,max1239"
- "maxim,max11600"
- "maxim,max11601"
- "maxim,max11602"
- "maxim,max11603"
- "maxim,max11604"
- "maxim,max11605"
- "maxim,max11606"
- "maxim,max11607"
- "maxim,max11608"
- "maxim,max11609"
- "maxim,max11610"
- "maxim,max11611"
- "maxim,max11612"
- "maxim,max11613"
- "maxim,max11614"
- "maxim,max11615"
- "maxim,max11616"
- "maxim,max11617"
- "maxim,max11644"
- "maxim,max11645"
- "maxim,max11646"
- "maxim,max11647"
- - reg: Should contain the ADC I2C address
-
-Optional properties:
- - vcc-supply: phandle to the regulator that provides power to the ADC.
- - vref-supply: phandle to the regulator for ADC reference voltage.
- - interrupts: IRQ line for the ADC. If not used the driver will use
- polling.
-
-Example:
-adc: max11644@36 {
- compatible = "maxim,max11644";
- reg = <0x36>;
- vref-supply = <&adc_vref>;
-};
diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max1238.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max1238.yaml
new file mode 100644
index 000000000000..a0ebb4680140
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/maxim,max1238.yaml
@@ -0,0 +1,76